-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.43 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
name: release
on:
push:
tags:
- "*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: DockerHub login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: setup Go
uses: actions/setup-go@v3
with:
go-version: ">=1.19.0"
- name: test
run: go test -v ./...
- name: goreleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
homebrew:
runs-on: ubuntu-latest
needs: release
steps:
- name: assert version
id: version
uses: nowsprinting/check-version-format-action@v3
with:
prefix: 'v'
- name: update homebrew tap
uses: mislav/bump-homebrew-formula-action@v2
with:
homebrew-tap: cuotos/homebrew-tap
download-url: https://github.com/cuotos/outstanding-prs/releases/download/${{ steps.version.outputs.full }}/outstanding-prs_${{ steps.version.outputs.full_without_prefix }}_Darwin_x86_64.tar.gz
env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}