Skip to content

Commit

Permalink
chore: Uses gha semantic-version to generates the release version
Browse files Browse the repository at this point in the history
  • Loading branch information
cyaiox committed Jul 23, 2024
1 parent ec935ec commit 57d348f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,21 @@ jobs:

- run: npm run build

- name: Generate Release Version
id: version
uses: paulhatch/[email protected]
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
Expand All @@ -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)

Expand Down

0 comments on commit 57d348f

Please sign in to comment.