-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
# labels: | ||
# - "📦 dependencies" | ||
assignees: | ||
- "okibcn" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Copyright (c) 2023 okibcn | ||
# This is free software, licensed under the GNU General Public License v3.0 | ||
# See /LICENSE for more information. | ||
# https://github.com/okibcn/ss | ||
# Description: Prepares package and releases it. | ||
|
||
name: Release | ||
on: | ||
# schedule: | ||
# - cron: '52 0 * * *' | ||
# runs at 0:52 UTC every day | ||
workflow_dispatch: | ||
inputs: | ||
debug_enabled: | ||
description: 'Run the build with tmate debugging enabled true/false (default: false)' | ||
required: false | ||
default: 'false' | ||
release: | ||
description: 'Type (yes) for release, (no) will generate an artifact (default: no)' | ||
required: false | ||
default: 'no' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: "⏬ Checkout repository" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "🐞 Debug session" | ||
uses: mxschmitt/action-tmate@v3 | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' | ||
## More info at https://til.simonwillison.net/github-actions/debug-tmate | ||
## or https://github.com/mxschmitt/action-tmate | ||
|
||
- name: "📦 Create Package" | ||
run: | | ||
############################ | ||
## ## | ||
## CREATE PACKAGE ## | ||
## ## | ||
############################ | ||
cp LICENSE README* -t ss | ||
VERSION=$(cat ss/ss.ps1 | grep -Po "^#.*v([\d\.\-]+)" | grep -Po "([\d\.\-]+)") | ||
7z a "./ss-v$VERSION.7z" ss/* | ||
echo "VERSION=${VERSION}" >>$GITHUB_ENV | ||
- name: "👍 Upload Artifact" | ||
uses: actions/upload-artifact@v3 | ||
if: github.event_name == 'workflow_dispatch' && github.event.inputs.release != 'yes' | ||
with: | ||
name: ${{ env.VERSION }} | ||
path: | | ||
*.7z | ||
- name: "🎉 Publish a new release" | ||
uses: softprops/[email protected] | ||
# go to https://github.com/OWNER/REPO/settings/actions and | ||
# in "**"Workflow Permissions" section give actions **Read and Write permissions**. | ||
if: github.event_name != 'workflow_dispatch' || github.event.inputs.release == 'yes' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ env.VERSION }} | ||
files: ./*.7z | ||
# body: | | ||
# ${{ env.BODY }} | ||
|