-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (47 loc) · 1.36 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
name: Release
on:
push:
branches-ignore:
- '**'
tags:
- '*'
jobs:
goreleaser:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: 1.20.x
- name: Install Dependencies
run: |
sudo apt update && sudo apt install -y gcc-aarch64-linux-gnu \
libbtrfs-dev libgpgme-dev libdevmapper-dev \
qemu-user-static binfmt-support
- name: Get previous tag
id: previoustag
run: |
PREVIOUS_TAG=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)
echo "PREVIOUS_TAG=$PREVIOUS_TAG" >> $GITHUB_OUTPUT
- name: Display previous tag
run: |
echo "Previous tag: ${{ steps.previoustag.outputs.PREVIOUS_TAG }}"
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.20.x
- name: Prepare
id: prepare
run: |
TAG=${GITHUB_REF#refs/tags/}
echo tag_name=${TAG} >> $GITHUB_OUTPUT
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
args: release --timeout=1h --debug
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}