Skip to content

Commit

Permalink
fix(actions): create the changelog with the release
Browse files Browse the repository at this point in the history
  • Loading branch information
graelo committed Aug 26, 2022
1 parent cfd942a commit 0e580e6
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
prepare-artifacts:
name: Prepare release artifacts
if: github.ref == 'refs/heads/main'
# if: github.ref == 'refs/heads/main'
runs-on: '${{ matrix.os }}'
strategy:
matrix:
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:

release:
name: Create a GitHub Release
if: github.ref == 'refs/heads/main'
# if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -98,12 +98,17 @@ jobs:
- name: checkout
uses: actions/checkout@v3

- name: Extract version
id: extract-version
run: |
printf "::set-output name=%s::%s\n" tag-name "${GITHUB_REF#refs/tags/}"
- name: Create the changelog
run: |
git show-ref
curl -sSfL https://github.com/convco/convco/releases/latest/download/convco-ubuntu.zip | zcat > convco
chmod +x convco
./convco changelog --max-versions 1 > CHANGELOG.md
./convco changelog ${{ steps.extract-version.outputs.tag-name }} --max-versions 1 > CHANGELOG.md
rm convco
- uses: actions/download-artifact@v3
Expand All @@ -127,7 +132,7 @@ jobs:

homebrew:
name: Bump Homebrew formula
if: github.ref == 'refs/heads/main'
# if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs:
- release
Expand All @@ -141,10 +146,10 @@ jobs:
if: "!contains(github.ref, '-')" # skip prereleases
with:
formula-name: tmux-backup
formula-path: Formula/tmux-backup.rb
homebrew-tap: graelo/homebrew-tap
base-branch: main
download-url: https://github.com/graelo/homebrew-tap/archive/refs/tags/${{ steps.extract-version.outputs.tag-name }}.tar.gz
# base-branch: main
create-pullrequest: true
download-url: https://github.com/graelo/tmux-backup/archive/refs/tags/${{ steps.extract-version.outputs.tag-name }}.tar.gz
commit-message: |
{{formulaName}} {{version}}
Expand Down

0 comments on commit 0e580e6

Please sign in to comment.