-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (41 loc) · 1.36 KB
/
release-publisher.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
name: GoReleaser
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.17.2
- name: Install bazelisk
# yamllint disable rule:line-length
run: |
sudo wget -O /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/download/v1.3.0/bazelisk-linux-amd64
sudo chmod +x /usr/local/bin/bazel
- name: Check out code
uses: actions/checkout@master
- name: stamp version
run: |
export VERSION=$(echo $GITHUB_REF|sed 's/refs\/tags\/v//')
echo "VERSION = '$VERSION'" > version.bzl
- name: bazel build darwin
run: bazel run :install
- name: clean working tree
run: |
git checkout -- version.bzl
- name: setup-syft
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | \
sh -s -- -b /usr/local/bin v0.32.0
- name: Run goreleaser
uses: goreleaser/goreleaser-action@master
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }}
DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
with:
version: latest
args: release