diff options
| author | Party Wumpus <48649272+PartyWumpus@users.noreply.github.com> | 2023-01-11 20:17:14 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-11 20:17:14 +0000 |
| commit | 56d0b2145c619593a8040105572b0cf587014df7 (patch) | |
| tree | 4901fe254a086cca76e2a4008837c8bab711f46f /.github/workflows/main.yml | |
| parent | abe465b26b73eab3b339fdaebeeedde604a8ce1b (diff) | |
| parent | 1415b5dd75a82d0ac24fadc48fafcfa2fb3bf484 (diff) | |
| download | decky-installer-56d0b2145c619593a8040105572b0cf587014df7.tar.gz decky-installer-56d0b2145c619593a8040105572b0cf587014df7.zip | |
Merge pull request #2 from PartyWumpus/main
Add automatic updates
Diffstat (limited to '.github/workflows/main.yml')
| -rw-r--r-- | .github/workflows/main.yml | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..dc484b4 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,80 @@ +name: "release" + +on: + workflow_dispatch: + inputs: + bump: + type: choice + description: Semver to bump + default: 'none' + options: + - none + - patch + - minor + - major + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Print input + run : | + echo "bump: ${{ github.event.inputs.bump }}\n" + + - name: Checkout 🧰 + uses: actions/checkout@v3 + + - 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: + 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 "no bump selected. Defaulting to a patch bump.\n" + OUT=$(semver bump patch "$VERSION") + printf "OUT: ${OUT}\n" + fi + 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: + name: Version ${{ steps.ready_tag.outputs.tag_name }} + tag_name: ${{ steps.ready_tag.outputs.tag_name }} + files: | + ${{ github.workspace }}/gui/decky_installer.desktop + ${{ github.workspace }}/gui/user_install_script.sh + ${{ github.workspace }}/cli/install_prerelease.sh + ${{ github.workspace }}/cli/install_release.sh + ${{ github.workspace }}/cli/uninstall.sh + prerelease: false + generate_release_notes: true + draft: true + |
