forked from notaryproject/notation
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 956 Bytes
/
release-github.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
name: release-github
on:
push:
tags:
- v*
jobs:
build:
name: Release Notation Binaries
runs-on: ubuntu-20.04
strategy:
matrix:
go-version: [1.19]
fail-fast: true
steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set GoReleaser Previous Tag To Be Last Non Weekly Release
run: |
pre_tag=`git tag --sort=-creatordate --list 'v*' | grep -v dev | head -2 | tail -1`
echo "GORELEASER_PREVIOUS_TAG=$pre_tag" >> $GITHUB_ENV
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}