-
Notifications
You must be signed in to change notification settings - Fork 4
72 lines (62 loc) · 2.13 KB
/
release.yml
File metadata and controls
72 lines (62 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Release
on:
pull_request:
paths:
- .github/workflows/release.yml
- ./scripts/release_notes
- .goreleaser.yml
push:
tags:
- "v*"
jobs:
build-and-verify:
uses: Open-CMSIS-Pack/workflows-and-actions-collection/.github/workflows/build-and-verify.yml@v1.0.2
with:
program: cbuild2cmake
go-version-file: ./go.mod
enable-qlty-coverage: false
goreleaser:
needs: [ build-and-verify ]
permissions:
contents: write # for goreleaser/goreleaser-action to create a GitHub release
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- name: Download test results
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
pattern: test-results-*
path: testreport/
- name: Zip test reports
run: |
zip -r testreport.zip testreport
- name: Attach test report to release assets
if: startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@6b7fa9f267e90b50a19fef07b3596790bb941741 # v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: testreport.zip
tag: ${{ github.ref }}
overwrite: true
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version-file: go.mod
check-latest: true
- name: Generate release notes
run: |
./scripts/release_notes > /tmp/RELEASE_NOTES
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
with:
version: latest
args: release ${{ github.event_name != 'push' && '--snapshot' || '' }} --clean --release-notes=/tmp/RELEASE_NOTES
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}