-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.15 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
name: Release
on:
release:
types: [ created ]
jobs:
release:
name: Release
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.16
- name: Checkout
uses: actions/checkout@v2
- name: Get cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
run: go get -v -t -d ./...
- name: Build packages
run: ./scripts/build-release.sh "${GITHUB_REF#refs/tags/v}"
- name: Upload assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./scripts/upload-release.sh "${GITHUB_REF#refs/tags/v}"
- name: Upload Docker images
env:
SKOPEO_AUTH: ${{ secrets.SKOPEO_AUTH }}
run: |
mkdir -p "${HOME}/.config/containers"
echo "${SKOPEO_AUTH}" > "${HOME}/.config/containers/auth.json"
./scripts/upload-docker.sh "${GITHUB_REF#refs/tags/v}"