Adapt workflow for new download-artifact action changes #42
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
pull_request: | |
paths: | |
- .github/workflows/release.yml | |
- ./scripts/release_notes | |
- .goreleaser.yml | |
push: | |
tags: | |
- "v*" | |
jobs: | |
test: | |
uses: Open-CMSIS-Pack/cbuild/.github/workflows/test.yml@main | |
goreleaser: | |
needs: test | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download test results | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
pattern: test-results-* | |
path: testreport/ | |
- name: Zip test reports | |
run: | | |
zip -r testreport.zip testreport | |
- name: Attach coverage report to release assets | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: testreport.zip | |
tag: ${{ github.ref }} | |
overwrite: true | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Install Go | |
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | |
with: | |
go-version-file: go.mod | |
check-latest: true | |
- name: Generate release notes | |
run: | | |
git fetch --unshallow | |
./scripts/release_notes > /tmp/RELEASE_NOTES | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 | |
with: | |
version: latest | |
args: release --clean --release-notes=/tmp/RELEASE_NOTES | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |