|
1 |
| -name: Release with goreleaser |
| 1 | +name: goreleaser |
| 2 | + |
2 | 3 | on:
|
3 | 4 | push:
|
4 | 5 | tags:
|
5 | 6 | - v*.*
|
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: write |
| 10 | + |
6 | 11 | jobs:
|
7 |
| - releases-matrix-windows: |
8 |
| - name: Release Go Binary for windows |
| 12 | + goreleaser: |
9 | 13 | runs-on: ubuntu-latest
|
10 |
| - strategy: |
11 |
| - matrix: |
12 |
| - goos: [windows] |
13 |
| - goarch: [amd64] |
14 | 14 | steps:
|
15 |
| - - uses: actions/checkout@v2 |
16 |
| - - uses: wangyoucao577/[email protected] |
17 |
| - with: |
18 |
| - pre_command: "bash ./src/rice-assets.sh" |
19 |
| - github_token: ${{ secrets.GITHUB_TOKEN }} |
20 |
| - goos: ${{ matrix.goos }} |
21 |
| - goarch: ${{ matrix.goarch }} |
22 |
| - goversion: 1.16 |
23 |
| - project_path: "./src" |
24 |
| - ldflags: "-s -w" |
25 |
| - |
26 |
| - releases-matrix-linux: |
27 |
| - name: Release Go Binary for linux |
28 |
| - runs-on: ubuntu-latest |
29 |
| - strategy: |
30 |
| - matrix: |
31 |
| - goos: [linux] |
32 |
| - goarch: [386, amd64] |
33 |
| - steps: |
34 |
| - - uses: actions/checkout@v2 |
35 |
| - - uses: wangyoucao577/[email protected] |
36 |
| - with: |
37 |
| - pre_command: "bash ./src/rice-assets.sh" |
38 |
| - github_token: ${{ secrets.GITHUB_TOKEN }} |
39 |
| - goos: ${{ matrix.goos }} |
40 |
| - goarch: ${{ matrix.goarch }} |
41 |
| - goversion: 1.16 |
42 |
| - project_path: "./src" |
43 |
| - ldflags: "-s -w" |
44 |
| - |
45 |
| - releases-matrix-darwin: |
46 |
| - name: Release Go Binary for darwin |
47 |
| - runs-on: ubuntu-latest |
48 |
| - strategy: |
49 |
| - matrix: |
50 |
| - goos: [darwin] |
51 |
| - goarch: [amd64] |
52 |
| - steps: |
53 |
| - - uses: actions/checkout@v2 |
54 |
| - - uses: wangyoucao577/[email protected] |
55 |
| - with: |
56 |
| - pre_command: "bash ./src/rice-assets.sh" |
57 |
| - github_token: ${{ secrets.GITHUB_TOKEN }} |
58 |
| - goos: ${{ matrix.goos }} |
59 |
| - goarch: ${{ matrix.goarch }} |
60 |
| - goversion: 1.16 |
61 |
| - project_path: "./src" |
62 |
| - ldflags: "-s -w" |
63 |
| - |
64 |
| - releases-matrix-linux-withoutembedded: |
65 |
| - name: Release Go Binary for linux without any embedded files |
66 |
| - runs-on: ubuntu-latest |
67 |
| - strategy: |
68 |
| - matrix: |
69 |
| - goos: [linux] |
70 |
| - goarch: [386, amd64] |
71 |
| - steps: |
72 |
| - - uses: actions/checkout@v2 |
73 |
| - - uses: wangyoucao577/[email protected] |
74 |
| - with: |
75 |
| - pre_command: "bash ./src/rice-assets.sh" |
76 |
| - github_token: ${{ secrets.GITHUB_TOKEN }} |
77 |
| - goos: ${{ matrix.goos }} |
78 |
| - goarch: ${{ matrix.goarch }} |
79 |
| - goversion: 1.16 |
80 |
| - project_path: "./src" |
81 |
| - ldflags: "-s -w" |
82 |
| - binary_name: swego-without-embedded |
83 |
| - |
84 |
| - releases-matrix-darwin-withoutembedded: |
85 |
| - name: Release Go Binary for darwin without any embedded files |
86 |
| - runs-on: ubuntu-latest |
87 |
| - strategy: |
88 |
| - matrix: |
89 |
| - goos: [darwin] |
90 |
| - goarch: [amd64] |
91 |
| - steps: |
92 |
| - - uses: actions/checkout@v2 |
93 |
| - - uses: wangyoucao577/[email protected] |
94 |
| - with: |
95 |
| - pre_command: "bash ./src/rice-assets.sh" |
96 |
| - github_token: ${{ secrets.GITHUB_TOKEN }} |
97 |
| - goos: ${{ matrix.goos }} |
98 |
| - goarch: ${{ matrix.goarch }} |
99 |
| - goversion: 1.16 |
100 |
| - project_path: "./src" |
101 |
| - ldflags: "-s -w" |
102 |
| - binary_name: swego-without-embedded |
| 15 | + - |
| 16 | + name: Checkout |
| 17 | + uses: actions/checkout@v2 |
| 18 | + with: |
| 19 | + fetch-depth: 0 |
| 20 | + - |
| 21 | + name: Set up Go |
| 22 | + uses: actions/setup-go@v2 |
| 23 | + with: |
| 24 | + go-version: 1.22 |
| 25 | + - |
| 26 | + name: Run GoReleaser |
| 27 | + uses: goreleaser/goreleaser-action@v2 |
| 28 | + with: |
| 29 | + distribution: goreleaser |
| 30 | + version: latest |
| 31 | + args: release --rm-dist |
| 32 | + workdir: src |
| 33 | + env: |
| 34 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments