-
Notifications
You must be signed in to change notification settings - Fork 5
79 lines (69 loc) · 2.01 KB
/
release.yml
File metadata and controls
79 lines (69 loc) · 2.01 KB
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
name: goreleaser-release
on:
push:
tags:
- 'v*'
jobs:
test:
name: Run Tests
runs-on: depot-ubuntu-22.04-4
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 1.x
check-latest: true
cache: true
- name: Go Test
run: |
go run main.go --version
go test -race -v -timeout 5m github.com/overmindtech/cli github.com/overmindtech/cli/tfutils
# Actually release the binaries including signing them
release:
runs-on: depot-ubuntu-22.04-32
if: ${{ github.event_name != 'pull_request' }}
needs: test
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 1.x
check-latest: true
cache: true
- name: Run GoReleaser (publish)
uses: goreleaser/goreleaser-action@v7
with:
# renovate: datasource=github-releases depName=goreleaser/goreleaser
version: "v2.14.3"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Used to create PRs on the Winget repo
WINGET_TOKEN: ${{ secrets.WINGET_TOKEN }}
- name: Install cloudsmith CLI
run: |
pip install --upgrade cloudsmith-cli
- name: Upload packages to cloudsmith
run: |
for i in dist/*.apk; do
cloudsmith push alpine overmind/tools/alpine/any-version $i
done
for i in dist/*.deb; do
cloudsmith push deb overmind/tools/any-distro/any-version $i
done
for i in dist/*.rpm; do
cloudsmith push rpm overmind/tools/any-distro/any-version $i
done
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}