summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorParty Wumpus <48649272+PartyWumpus@users.noreply.github.com>2023-01-11 19:55:19 +0000
committerGitHub <noreply@github.com>2023-01-11 19:55:19 +0000
commita5506f85711fd1fb5446ac9ec4ed646a740c5092 (patch)
tree2627537f41ca07ce69cd7d35ff76a43cbff84c67 /.github
parent426d820c5dc661bd29b3b7c1377cfc59f4a7f3b9 (diff)
downloaddecky-installer-a5506f85711fd1fb5446ac9ec4ed646a740c5092.tar.gz
decky-installer-a5506f85711fd1fb5446ac9ec4ed646a740c5092.zip
Update main.yml
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/main.yml73
1 files changed, 62 insertions, 11 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index add9dbf..bed5397 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,24 +1,75 @@
name: "release"
on:
- push:
- tags:
- - "*"
+ workflow_dispatch:
+ inputs:
+ bump:
+ type: choice
+ description: Semver to bump
+ default: 'none'
+ options:
+ - none
+ - patch
+ - minor
+ - major
jobs:
- build:
+ release:
runs-on: ubuntu-latest
steps:
+ - name: Print input
+ run : |
+ echo "bump: ${{ github.event.inputs.bump }}\n"
+
- name: Checkout 🧰
uses: actions/checkout@v3
- - uses: xresloader/upload-to-github-release@main
+ - name: Install semver-tool asdf
+ uses: asdf-vm/actions/install@v1
+ with:
+ tool_versions: |
+ semver 3.3.0
+
+ - name: Get latest release
+ uses: rez0n/actions-github-release@main
+ id: latest_release
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ token: ${{ secrets.GITHUB_TOKEN }}
+ repository: "SteamDeckHomebrew/decky-installer"
+ type: "nodraft"
+
+ - name: Prepare tag ⚙️
+ id: ready_tag
+ run: |
+ export VERSION=${{ steps.latest_release.outputs.release }}
+ echo "VERS: $VERSION"
+ OUT="notsemver"
+ if [[ "${{github.event.inputs.bump}}" != "none" ]]; then
+ OUT=$(semver bump ${{github.event.inputs.bump}} "$VERSION")
+ printf "OUT: ${OUT}\n"
+ else
+ printf "previous tag is a release, but no bump selected. Defaulting to a patch bump.\n"
+ OUT=$(semver bump patch "$VERSION")
+ printf "OUT: ${OUT}\n"
+ echo "vOUT: v$OUT"
+ echo tag_name=v$OUT >> $GITHUB_OUTPUT
+ - name: Push tag 📤
+ uses: rickstaa/action-create-tag@v1.3.2
+ if: ${{ steps.ready_tag.outputs.tag_name && github.event_name == 'workflow_dispatch' && !env.ACT }}
+ with:
+ tag: ${{ steps.ready_tag.outputs.tag_name }}
+ message: Pre-release ${{ steps.ready_tag.outputs.tag_name }}
+
+ - name: Release 📦
+ uses: softprops/action-gh-release@v1
+ if: ${{ github.event_name == 'workflow_dispatch' && !env.ACT }}
with:
- tag_name: ${{ github.ref }}
- draft: false
- update_latest_release: false
- file: "${{ github.workspace }}/gui/decky_installer.desktop;${{ github.workspace }}/gui/user_install_script.sh"
- verbose: true
+ name: |
+ ${{ github.workspace }}/gui/decky_installer.desktop
+ ${{ github.workspace }}/gui/user_install_script.sh
+ tag_name: ${{ steps.ready_tag.outputs.tag_name }}
+ files: ./dist/PluginLoader
+ prerelease: false
+ generate_release_notes: true
+ draft: true