Skip to content

Commit

Permalink
ci(release): Upgrade action version and add conditional steps
Browse files Browse the repository at this point in the history
If the action is run locally using nektos/act, then GITHUB_TOKEN must
be passed via --secret. If run on GitHub, the token is obtained using
the 'Get GitHub authentication token' step.
  • Loading branch information
chris3ware committed Sep 29, 2022
1 parent 21bf229 commit 39307c7
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/semantic-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
persist-credentials: false

- name: Get GitHub authentication token
if: ${{ !env.ACT }}
if: ${{ ! env.ACT }}
id: get_workflow_token
uses: peter-murray/workflow-application-token-action@v1
with:
Expand All @@ -30,12 +30,25 @@ jobs:
organization: 3ware

- name: Create GitHub release and update CHANGELOG
uses: cycjimmy/semantic-release-action@v2
if: ${{ ! env.ACT }}
uses: cycjimmy/semantic-release-action@v3
with:
semantic_version: 18.0.0
semantic_version: 19.0.0
extra_plugins: |
@semantic-release/[email protected]
@semantic-release/[email protected]
conventional-changelog-conventionalcommits@4.6.3
conventional-changelog-conventionalcommits@5.0.0
env:
GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }}

- name: Local test release
if: ${{ env.ACT }}
uses: cycjimmy/semantic-release-action@v3
with:
semantic_version: 19.0.0
extra_plugins: |
@semantic-release/[email protected]
@semantic-release/[email protected]
[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 39307c7

Please sign in to comment.