diff options
| author | TrainDoctor <traindoctor@protonmail.com> | 2022-08-11 16:08:27 -0700 |
|---|---|---|
| committer | TrainDoctor <traindoctor@protonmail.com> | 2022-08-11 16:10:00 -0700 |
| commit | 860caf440b297f82a58adc8ea447fb64e42b4dd4 (patch) | |
| tree | e12d165a6d2e0784b785e1e847b680492af3b41e /.github | |
| parent | 64040879f57fe67b9ba5f6f07c68c056b19695aa (diff) | |
| download | decky-loader-860caf440b297f82a58adc8ea447fb64e42b4dd4.tar.gz decky-loader-860caf440b297f82a58adc8ea447fb64e42b4dd4.zip | |
Add semver tool, temporarily disable triggered pre-releases
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/build.yml | 94 |
1 files changed, 73 insertions, 21 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 44766b1d..04487b50 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -75,12 +75,6 @@ jobs: name: PluginLoader path: dist - - name: Bump version and push tag ⏫ - id: tag_version - uses: mathieudutour/github-tag-action@v6.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - name: Release 📦 uses: softprops/action-gh-release@v1 with: @@ -89,9 +83,9 @@ jobs: files: ./dist/PluginLoader generate_release_notes: true - nightly: - name: Release the nightly version of the package - if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'prerelease') }} + prerelease: + name: Release the pre-release version of the package + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'prerelease' }} needs: build runs-on: ubuntu-latest @@ -105,6 +99,12 @@ jobs: name: PluginLoader path: dist + - name: Install semver-tool asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + semver 3.3.0 + - name: Get tag 🏷️ id: old_tag uses: rafarlopes/get-latest-pre-release-tag-action@v1 @@ -112,13 +112,17 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: repository: 'decky-loader' - + - name: Prepare tag ⚙️ id: ready_tag run: | export VERSION=${{ steps.old_tag.outputs.tag }} - export COMMIT=$(git log -1 --pretty=format:%h) - echo ::set-output name=tag_name::$(sed -r 's/(-.*)?-pre$//' <<< $VERSION)-$COMMIT-pre + export SEMVER=$(sed -r 's/(-.*)?-pre$//' <<< $VERSION) + # check if original tag is release, if so we add "-pre" to the end + # [[ "$VERSION" =~ "pre" ]] && $APPENDPRE="true" + OUT=$(semver bump prerel "$SEMVER")-pre + # [[ "$APPENDPRE" == "true" ]] && "$OUT"="$OUT"-pre + echo ::set-output name=tag_name::$(sed -r 's/(-.*)?-pre$//' <<< $VERSION)-pre - name: Push tag 📤 uses: rickstaa/action-create-tag@v1.3.2 @@ -127,15 +131,63 @@ jobs: tag: ${{ steps.ready_tag.outputs.tag_name }} message: Nightly ${{ steps.ready_tag.outputs.tag_name }} - - name: Release 📦 - uses: softprops/action-gh-release@v1 - if: ${{ github.event_name == 'workflow_dispatch' }} - with: - name: Prerelease ${{ steps.ready_tag.outputs.tag_name }} - tag_name: ${{ steps.ready_tag.outputs.tag_name }} - files: ./dist/PluginLoader - prerelease: true - generate_release_notes: true + # - name: Release 📦 + # uses: softprops/action-gh-release@v1 + # if: ${{ github.event_name == 'workflow_dispatch' }} + # with: + # name: Prerelease ${{ steps.ready_tag.outputs.tag_name }} + # tag_name: ${{ steps.ready_tag.outputs.tag_name }} + # files: ./dist/PluginLoader + # prerelease: true + # generate_release_notes: true + + # nightly: + # name: Release the nightly version of the package + # if: ${{ github.event_name == 'schedule' }} + # needs: build + # runs-on: ubuntu-latest + + # steps: + # - name: Checkout 🧰 + # uses: actions/checkout@v3 + + # - name: Fetch package artifact ⬇️ + # uses: actions/download-artifact@v3 + # with: + # name: PluginLoader + # path: dist + + # - name: Get tag 🏷️ + # id: old_tag + # uses: rafarlopes/get-latest-pre-release-tag-action@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # repository: 'decky-loader' + + # - name: Prepare tag ⚙️ + # id: ready_tag + # run: | + # export VERSION=${{ steps.old_tag.outputs.tag }} + # export COMMIT=$(git log -1 --pretty=format:%h) + # echo ::set-output name=tag_name::$(sed -r 's/(-.*)?-pre$//' <<< $VERSION)-$COMMIT-nightly + + # - name: Push tag 📤 + # uses: rickstaa/action-create-tag@v1.3.2 + # if: ${{ steps.ready_tag.outputs.tag_name && github.event_name == 'workflow_dispatch' }} + # with: + # tag: ${{ steps.ready_tag.outputs.tag_name }} + # message: Nightly ${{ steps.ready_tag.outputs.tag_name }} + + # - name: Release 📦 + # uses: softprops/action-gh-release@v1 + # if: ${{ github.event_name == 'workflow_dispatch' }} + # with: + # name: Prerelease ${{ steps.ready_tag.outputs.tag_name }} + # tag_name: ${{ steps.ready_tag.outputs.tag_name }} + # files: ./dist/PluginLoader + # prerelease: true + # generate_release_notes: true # - name: Bump prerelease ⏫ # id: bump |
