From 57d348f1d57efed4ba5b5b817538b73b543e9f50 Mon Sep 17 00:00:00 2001 From: Gabriel Diaz Date: Tue, 23 Jul 2024 13:07:51 -0300 Subject: [PATCH] chore: Uses gha semantic-version to generates the release version --- .github/workflows/release.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6c0d9ac..942394c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,6 +78,21 @@ jobs: - run: npm run build + - name: Generate Release Version + id: version + uses: paulhatch/semantic-version@v5.4.0 + with: + tag_prefix: "" + major_pattern: "/\bmajor|breaking\b/" + minor_pattern: "/\bminor|feat\b/" + version_format: "${major}.${minor}.${patch}${{ github.ref == 'refs/heads/main' && '' || -${increment} }}" + change_path: "packages/" + bump_each_commit: true + bump_each_commit_patch_pattern: "/\bmajor|minor|patch|feat|fix\b/" + search_commit_body: true + user_format_type: "json" + enable_prerelease_mode: true + - name: Compile artifacts ${{ inputs.dry-run && '' || 'and upload them to github release' }} # I use this action because it is capable of retrying multiple times if there are any issues with the distribution server uses: nick-fields/retry@v3 @@ -95,6 +110,8 @@ jobs: # See https://www.electron.build/code-signing CSC_LINK: ${{ secrets.MACOS_CSC_LINK }} CSC_KEY_PASSWORD: ${{ secrets.MACOS_CSC_KEY_PASSWORD }} + # Version build number + BUILD_NUMBER: ${{ steps.version.outputs.version_tag }} # Publishing artifacts GH_TOKEN: ${{ secrets.github_token }} # GitHub token, automatically provided (No need to define this secret in the repo settings)