-
Notifications
You must be signed in to change notification settings - Fork 11
46 lines (41 loc) · 1.13 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
name: release
on:
push:
tags:
- v*
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check direct push
run: |
VERSION_FILE_PATH="internal/index/version.txt"
if ! grep -q "${TAG/v/}" "$VERSION_FILE_PATH"; then
echo "error: scip-go version in $VERSION_FILE_PATH doesn't match NEW_VERSION=$NEW_VERSION"
exit 1
fi
env:
TAG: ${{ github.ref_name }}
- name: Install ASDF
uses: asdf-vm/actions/setup@v3
- name: Install matching Go toolchain
run: |
asdf plugin add golang
asdf install golang
- uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: v2.0.1
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}