-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #745 from kduprey/feature/update-release-workflows
feat: Updating workflows to use main branch for trigger and versionin…
- Loading branch information
Showing
3 changed files
with
90 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Cut Major Release | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
branches: | ||
- main | ||
|
||
# when a push is made to develop branch by kduprey, and the merge branch does not include hotfix, and merge branch has label 'major version', it will cut a major release | ||
|
||
jobs: | ||
cutMajorRelease: | ||
if: github.actor == 'kduprey' && github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'major version') | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
name: Cut Major Release | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: main | ||
|
||
- name: Get previous tag | ||
id: previoustag | ||
uses: WyriHaximus/[email protected] | ||
with: | ||
prefix: "v" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get next version | ||
id: semvers | ||
uses: WyriHaximus/[email protected] | ||
with: | ||
version: ${{ steps.previoustag.outputs.tag }} | ||
|
||
- name: Create release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ steps.semvers.outputs.v_major }} | ||
generateReleaseNotes: true | ||
commit: "main" | ||
|
||
- name: Create Sentry release | ||
uses: getsentry/action-release@v1 | ||
env: | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | ||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | ||
with: | ||
environment: production | ||
version: ${{ steps.semvers.outputs.v_major }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters