forked from protobom/sbom-convert
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (81 loc) · 2.22 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: release
on:
workflow_dispatch:
inputs:
release-as:
description: "semver type of the release"
type: choice
options:
- patch
- minor
- major
default: none
required: true
prerelease:
description: "release as prerelease"
type: boolean
required: true
default: true
prerelease-suffix:
description: suffix for your prerelease versions
type: string
required: false
default: beta
permissions: write-all
jobs:
release:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
name: release
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Setup Go
uses: actions/setup-go@v3
with:
cache: true
go-version: ">=1.20.6"
- uses: actions/cache@v3
with:
path: |
./dist/*.deb
./dist/*.rpm
./dist/*.apk
key: ${{ github.ref }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch tags
run: git fetch --force --tags
- name: Bump version and push tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: ${{ inputs.release-as }}
PRERELEASE: ${{ inputs.prerelease }}
PRERELEASE_SUFFIX: ${{ inputs.prerelease-suffix }}
VERBOSE: true
DRY_RUN: false
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
ORG_NAME: ${{ github.repository_owner }}
- name: Upload assets
uses: actions/upload-artifact@v3
with:
name: ${{ github.repository_owner }}
path: dist/*