Skip to content

Commit

Permalink
Small release workflow tweaks
Browse files Browse the repository at this point in the history
- Reorder script so that announce step runs last
- Check for success at each step
  • Loading branch information
shashachu committed Jan 3, 2023
1 parent f9daa75 commit e820414
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,42 @@ jobs:

- name : Extract release notes
id : release_notes
if: ${{ success() }}
uses : ffurrer2/extract-release-notes@v1

- name : Create release
id: github_release
if: ${{ success() }}
uses : softprops/action-gh-release@v1
with :
draft: false
prerelease: true # Remove this after testing
body : ${{ steps.release_notes.outputs.release_notes }}
files: |
ktlint/build/run/*
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}

- name: Get version
id: get_version
if: ${{ success() }}
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

- name: Bump Homebrew Formula
if: ${{ success() }}
uses: mislav/bump-homebrew-formula-action@v1
env:
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TOKEN }}
with:
formula-name: ktlint
download-url: https://github.com/pinterest/ktlint/releases/download/${{ env.version }}/ktlint

- name: Announce Release
if: ${{ success() }}
run: |
git config user.email "<>" |
git config user.name "Ktlint Release Workflow" |
./.announce -y
env:
VERSION: ${{ env.version }}

- name: Bump Homebrew Formula
uses: mislav/bump-homebrew-formula-action@v1
env:
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TOKEN }}
with:
formula-name: ktlint
download-url: https://github.com/pinterest/ktlint/releases/download/${{ env.version }}/ktlint

0 comments on commit e820414

Please sign in to comment.