-
Notifications
You must be signed in to change notification settings - Fork 6
57 lines (49 loc) · 1.59 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
name: Release
on:
push:
branches:
- main
tags:
- "v*"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22.x"
- name: Setup Private Git Repo Access
run: echo "machine github.com login bacongobbler password ${GITHUB_TOKEN}" > $HOME/.netrc
env:
GITHUB_TOKEN: ${{ secrets.SPINKUBE_GITHUB_ACCESS_TOKEN }}
- name: Install dependencies
run: go mod download
- name: GoReleaser
uses: goreleaser/goreleaser-action@v5.0.0
with:
version: latest
args: release --clean ${{ github.ref == 'refs/heads/main' && '--snapshot' || '' }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: create GitHub release (canary)
if: github.ref == 'refs/heads/main'
run: |
gh release delete canary --cleanup-tag
gh release create canary dist/spin-plugin-kube*.tar.gz \
--title canary \
--prerelease \
--notes-file - <<- EOF
This is a "canary" release of the most recent commits on our main branch. Canary is **not stable**.
It is only intended for developers wishing to try out the latest features in Spin, some of which may not be fully implemented.
EOF
env:
GH_TOKEN: ${{ github.token }}
- name: Release Plugin
uses: rajatjindal/spin-plugin-releaser@v1
with:
github_token: ${{ github.token }}
upload_checksums: true
template_file: contrib/spin-plugin.json.tmpl