-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (47 loc) · 1.25 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
name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
name: Release
strategy:
matrix:
os:
- ubuntu-latest
go:
- '1.21'
include:
- go: '1.21'
GO_SEMVER: '~1.21.0'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.GO_SEMVER }}
check-latest: true
- name: Install Cloudsmith CLI
run: pip install --upgrade cloudsmith-cli
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --clean --timeout 30m
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
TAG: ${{ steps.vars.outputs.version_tag }}
- name: Publish .deb to Cloudsmith
if: ${{ steps.vars.output.tag_special == '' }}
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
run: |
for filename in dist/*.deb; do
echo "Pushing $filename to 'stable'"
cloudsmith push deb pzip/stable/any-distro/any-version $filename
done