-
-
Notifications
You must be signed in to change notification settings - Fork 2
71 lines (61 loc) · 1.84 KB
/
build.yaml
File metadata and controls
71 lines (61 loc) · 1.84 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
name: "Build CLI and Attach to GitHub Release"
on:
release:
types: [published]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
build:
name: "Build CLI and Attach to GitHub Release"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
# Setup Go
- name: "Setup Go"
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
# Print Go version
- run: go version
# Build and release
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v7
with:
version: latest
args: release --parallelism 2 --clean
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
- name: Get Debian Package Names
id: deb_package
run: |
echo "ARM_PACKAGE=$(find dist/ -name '*arm64.deb' | head -n 1)" >> $GITHUB_ENV
echo "AMD_PACKAGE=$(find dist/ -name '*amd64.deb' | head -n 1)" >> $GITHUB_ENV
# Push the Debian package to Cloudsmith
- name: Push Debian ARM package to Cloudsmith
id: push_arm
uses: cloudsmith-io/action@master
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
command: "push"
format: "deb"
owner: "rosesecurity"
repo: "terrafetch"
distro: "any-distro"
release: "any-version"
file: ${{ env.ARM_PACKAGE }}
- name: Push Debian AMD package to Cloudsmith
id: push_amd
uses: cloudsmith-io/action@master
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
command: "push"
format: "deb"
owner: "rosesecurity"
repo: "terrafetch"
distro: "any-distro"
release: "any-version"
file: ${{ env.AMD_PACKAGE }}