diff options
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/build.yml | 83 |
1 files changed, 36 insertions, 47 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8b27056..59203a09 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,31 +80,6 @@ jobs: with: path: ./dist/PluginLoader - # release: - # name: Release the package - # if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'release' }} - # 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: Release 📦 - # uses: softprops/action-gh-release@v1 - # if: ${{ !env.ACT }} - # with: - # name: Release ${{ steps.tag_version.outputs.new_tag }} - # tag_name: ${{ steps.tag_version.outputs.new_tag }} - # files: ./dist/PluginLoader - # generate_release_notes: true - release: name: Release stable version of the package if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'release' }} @@ -133,8 +108,7 @@ jobs: id: latest_release env: token: ${{ secrets.GITHUB_TOKEN }} - # repository: "SteamDeckHomebrew/decky-loader" - repository: "TrainDoctor/decky-loader" + repository: "SteamDeckHomebrew/decky-loader" type: "nodraft" - name: Prepare tag ⚙️ @@ -144,21 +118,25 @@ jobs: echo "VERS: $VERSION" OUT="notsemver" if [[ "$VERSION" =~ "-pre" ]]; then - printf "is prerelease, bumping release\n" + printf "is prerelease, bumping to release\n" OUT=$(semver bump release "$VERSION") - printf "OUT: ${OUT}\n" + printf "OUT: ${OUT}\n"\ + printf "bumping by selected type.\n" if [[ "${{github.event.inputs.bump}}" != "none" ]]; then OUT=$(semver bump ${{github.event.inputs.bump}} "$OUT") printf "OUT: ${OUT}\n" + else + printf "no type selected, defaulting to patch.\n" + OUT=$(semver bump patch "$OUT") + printf "OUT: ${OUT}\n" fi elif [[ ! "$VERSION" =~ "-pre" ]]; then - printf "is a release, bumping as selected\n" + printf "previous tag is a release, bumping by selected type.\n" if [[ "${{github.event.inputs.bump}}" != "none" ]]; then OUT=$(semver bump ${{github.event.inputs.bump}} "$VERSION") printf "OUT: ${OUT}\n" else - printf "none bump selected, but cannot have identical tag\n" - printf "bumping patch\n" + 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" fi @@ -182,7 +160,7 @@ jobs: files: ./dist/PluginLoader prerelease: false generate_release_notes: true - + prerelease: name: Release the pre-release version of the package if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'prerelease' }} @@ -220,24 +198,35 @@ jobs: export VERSION=${{ steps.latest_release.outputs.release }} echo "VERS: $VERSION" OUT="" - if [[ ! ${{ github.event.inputs.bump }} == "none" ]]; then - printf "bumping by release then by selected\n" - OUT=$(semver bump release "$VERSION") + if [[ ! "$VERSION" =~ "-pre" ]]; then + printf "pre-release from release, bumping by selected type and prerel\n" + if [[ ! ${{ github.event.inputs.bump }} == "none" ]]; then + OUT=$(semver bump ${{github.event.inputs.bump}} "$VERSION") printf "OUT: ${OUT}\n" - OUT=$(semver bump ${{github.event.inputs.bump}} "$OUT") + else + printf "type not selected, defaulting to patch\n" + OUT=$(semver bump patch "$VERSION") printf "OUT: ${OUT}\n" - if [[ ! "$OUT" =~ "-pre" ]]; then - printf "appending -pre to new prerelease\n" - OUT="${OUT}-pre" - printf "OUT: ${OUT}\n" - fi - fi - if [[ "$OUT" == "" ]]; then - OUT=$(semver bump prerel "$VERSION") - else + fi + OUT="$OUT-pre" OUT=$(semver bump prerel "$OUT") + printf "OUT: ${OUT}\n" + elif [[ "$VERSION" =~ "-pre" ]]; then + printf "pre-release to pre-release, bumping by selected type and or prerel version\n" + if [[ ! ${{ github.event.inputs.bump }} == "none" ]]; then + OUT=$(semver bump ${{github.event.inputs.bump}} "$VERSION") + printf "OUT: ${OUT}\n" + printf "bumping prerel\n" + OUT=$(semver bump prerel "$OUT") + printf "OUT: ${OUT}\n" + else + printf "type not selected, defaulting to new pre-release only\n" + printf "bumping prerel\n" + OUT=$(semver bump prerel "$VERSION") + printf "OUT: ${OUT}\n" + fi fi - echo "OUT: v$OUT" + printf "vOUT: v${OUT}\n" echo ::set-output name=tag_name::v$OUT - name: Push tag 📤 |
