-
Notifications
You must be signed in to change notification settings - Fork 48
69 lines (65 loc) · 2.11 KB
/
go-releaser.yml
File metadata and controls
69 lines (65 loc) · 2.11 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
name: goreleaser
on:
push:
# run only against tags
tags:
- '*'
permissions:
contents: write
# packages: write
# issues: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v3
with:
go-version: '>=1.19.2'
cache: true
# More assembly might be required: Docker logins, GPG, etc. It all depends
# on your needs.
- uses: goreleaser/goreleaser-action@v2
with:
# either 'goreleaser' (default) or 'goreleaser-pro':
distribution: goreleaser
version: ${{ env.GITHUB_REF_NAME }}
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN}}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro'
# distribution:
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
- run: echo "VERSION_NAME=${GITHUB_REF_NAME:1}" >> $GITHUB_ENV
- run: echo $VERSION_NAME
- uses: actions/upload-artifact@v2
with:
name: goreleaser-deb
path: dist/perfops_${{ env.VERSION_NAME }}_linux_amd64.deb
- uses: actions/upload-artifact@v2
with:
name: goreleaser-rpm
path: dist/perfops_${{ env.VERSION_NAME }}_linux_amd64.rpm
deploy:
needs: goreleaser
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: goreleaser-deb
- uses: actions/download-artifact@v2
with:
name: goreleaser-rpm
- run: echo "VERSION_NAME=${GITHUB_REF_NAME:1}" >> $GITHUB_ENV
- run: echo perfops-cli_${{ env.VERSION_NAME }}_linux_amd64.deb
- run: ls -la
- uses: ProspectOne/upload-packagecloud@v1
with:
DEB-PACKAGE-NAME: perfops_${{ env.VERSION_NAME }}_linux_amd64.deb
RPM-PACKAGE-NAME: perfops_${{ env.VERSION_NAME }}_linux_amd64.rpm
PACKAGECLOUD-USERNAME: p1
PACKAGECLOUD-REPO: perfops
PACKAGECLOUD-TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}