Skip to content

Commit

Permalink
Fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
arnested committed Jun 9, 2022
1 parent f446d64 commit c60b0aa
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,31 @@ jobs:
fetch-depth: 0
- name: Bump version and push tag
uses: anothrNick/[email protected]
if: ${{ steps.dist.outputs.changed == 'true' }}
id: version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
- name: Major version tag
id: major-version
if: ${{ (steps.dist.outputs.changed == 'true') && (steps.version.outputs.new_tag != '') }}
if: ${{ (steps.version.outputs.new_tag != '') }}
uses: actions/github-script@v6
with:
script: |
core.setOutput('tag', '${{ steps.version.outputs.new_tag }}'.split('.')[0])
- name: Tag ${{ steps.major-version.outputs.tag }}
if: ${{ (steps.dist.outputs.changed == 'true') && (steps.version.outputs.new_tag != '') }}
if: ${{ (steps.version.outputs.new_tag != '') }}
run: |
git tag --force ${{ steps.major-version.outputs.tag }}
git push origin ${{ steps.major-version.outputs.tag }} --force
- name: Get current date
id: date
run: echo "::set-output name=date::$(date --iso-8601)"
- name: Build full ChangeLog
if: ${{ (steps.dist.outputs.changed == 'true') && (steps.version.outputs.new_tag != '') }}
if: ${{ (steps.version.outputs.new_tag != '') }}
run: npx conventional-changelog-cli --release-count=0 --preset=eslint --outfile="${{ runner.temp }}/FullChangeLog.md"
- name: Create/update major version release
if: ${{ (steps.dist.outputs.changed == 'true') && (steps.version.outputs.new_tag != '') }}
if: ${{ (steps.version.outputs.new_tag != '') }}
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -49,10 +48,10 @@ jobs:
name: ${{ steps.version.outputs.new_tag }} (${{ steps.date.outputs.date }})
bodyFile: ${{ runner.temp }}/FullChangeLog.md
- name: Build ChangeLog
if: ${{ (steps.dist.outputs.changed == 'true') && (steps.version.outputs.new_tag != '') }}
if: ${{ (steps.version.outputs.new_tag != '') }}
run: npx conventional-changelog-cli --release-count=2 --outfile="${{ runner.temp }}/ChangeLog.md"
- name: Create release
if: ${{ (steps.dist.outputs.changed == 'true') && (steps.version.outputs.new_tag != '') }}
if: ${{ (steps.version.outputs.new_tag != '') }}
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit c60b0aa

Please sign in to comment.