-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.28 KB
/
release.yml
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
name: 'ci'
on:
pull_request:
branches:
- main
types: [opened, synchronize, closed]
permissions:
id-token: write
packages: write
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'
steps:
- name: "checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: validate
run: |
.github/scripts/validate.sh
- name: Install Syft
uses: anchore/sbom-action/download-syft@fc46e51fd3cb168ffb36c6d1915723c47db58abb # v0.17.7
- name: release
run: |
set -e; awk 'NR==2 {print RT,$0}' RS="## [v|0-9]" OFS="" CHANGELOG.md > release_description.md
cat release_description.md
echo $IMAGEVERSION
git config --global user.email "autobump@gha.com"
git config --global user.name "autobump"
git tag $IMAGEVERSION
- uses: goreleaser/goreleaser-action@v6 # run goreleaser
with:
version: '~> v2'
args: release --clean --release-notes release_description.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}