Skip to content

Commit

Permalink
fix(ci): Fix & simplify workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
reitzig committed Feb 4, 2024
1 parent 427e489 commit 7b71a1a
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .changes/unreleased/Fixed-20240204-232854.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Fixed
body: 'CI: load mise env vars'
time: 2024-02-04T23:28:54.53370826+01:00
27 changes: 18 additions & 9 deletions .github/workflows/releasable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,26 @@ jobs:
Please add one with `changie new`, or
apply label '${skip-label}' label to the pull request."
- name: Test release note assembly
uses: miniscruff/changie-action@v2
- uses: jdx/mise-action@v2
with:
args: batch auto
install: false # we only need env

- name: Test changelog assembly
uses: miniscruff/changie-action@v2
with:
args: merge
# Workaround for https://github.com/jdx/mise-action/issues/36
- name: Load mise env
run: |
mise env -s bash \
| grep -v 'export PATH=' \
| cut -d' ' -f2 \
>> "$GITHUB_ENV"
- name: Test computation of next version
- name: Install changie
uses: miniscruff/changie-action@v2
with:
args: next auto
args: --version

- name: Test changelog assembly
run: |
changie next auto
changie batch auto
changie merge
changie latest
1 change: 0 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
steps:
- uses: actions/checkout@v4

#- uses: jdx/mise-action@v2
# TODO: test again?

- name: Run GoReleaser
Expand Down
36 changes: 23 additions & 13 deletions .github/workflows/trigger-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,40 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Assemble release notes
uses: miniscruff/changie-action@v2
- uses: jdx/mise-action@v2
with:
args: batch auto
install: false # we only need env

- name: Update changelog
uses: miniscruff/changie-action@v2
with:
args: merge
# Workaround for https://github.com/jdx/mise-action/issues/36
- name: Load mise env
run: |
mise env -s bash \
| grep -v 'export PATH=' \
| cut -d' ' -f2 \
>> "$GITHUB_ENV"
- name: Determine release version
id: release_version
- name: Install changie
uses: miniscruff/changie-action@v2
with:
args: latest # NB: changie already decided!
args: --version

- name: Assemble release notes
run: |
changie batch auto
changie merge
- name: Commit changelog
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
git commit -m "chore(doc): CHANGELOG for ${{ steps.release_version.outputs.output }}"
git add ".changes/$(changie latest).md"
git add CHANGELOG.md
git commit -m "chore(doc): CHANGELOG for $(changie latest)"
git push origin
- name: Create tag
run: |
git tag ${{ steps.release_version.outputs.output }}
git push origin ${{ steps.release_version.outputs.output }}
git tag "$(changie latest)"
git push origin "$(changie latest)"

0 comments on commit 7b71a1a

Please sign in to comment.