Commit eda2def 1 parent d5c12ec commit eda2def Copy full SHA for eda2def
File tree 1 file changed +8
-49
lines changed
1 file changed +8
-49
lines changed Original file line number Diff line number Diff line change 1
- name : Release packaging
1
+ name : Release
2
2
3
3
on :
4
4
workflow_dispatch :
5
+ pull_request :
5
6
push :
6
- branches :
7
- - main
8
- tags :
9
- - ' v[0-9]+.*'
10
7
11
- permissions :
12
- contents : write
8
+ permissions : {}
13
9
14
10
jobs :
15
11
release :
16
- runs-on : ubuntu-latest
17
- steps :
18
- - name : Checkout
19
- uses : actions/checkout@v3
20
- with :
21
- # Required by GoReleaser
22
- fetch-depth : 0
12
+ uses : hansmi/ghactions-goreleaser-workflow/.github/workflows/release.yaml@stable
13
+ permissions :
14
+ contents : write
15
+ packages : write
23
16
24
- - name : Go setup
25
- uses : actions/setup-go@v3
26
- with :
27
- go-version : 1
28
-
29
- - name : Set variables
30
- id : vars
31
- env :
32
- EVENT_NAME : ${{ github.event_name }}
33
- REF : ${{ github.ref }}
34
- run : |
35
- if [[ "$EVENT_NAME" = push && "$REF" = refs/tags/v[0-9]*.* ]]; then
36
- args=()
37
- else
38
- args=( --skip-publish )
39
- fi
40
- echo "goreleaser_args=${args[*]}" >> $GITHUB_OUTPUT
41
-
42
- - name : Run GoReleaser
43
- uses : goreleaser/goreleaser-action@v3
44
- with :
45
- distribution : goreleaser
46
- version : latest
47
- args : release --rm-dist ${{ steps.vars.outputs.goreleaser_args }}
48
- env :
49
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
50
-
51
- - name : Upload assets
52
- uses : actions/upload-artifact@v3
53
- with :
54
- name : prometheus-lvm-exporter-${{ hashFiles('dist/**') }}
55
- path : dist/**
56
- if-no-files-found : error
57
-
58
- # vim: set sw=2 sts=2 et : -->
17
+ # vim: set sw=2 sts=2 et :
You can’t perform that action at this time.
0 commit comments