Skip to content

Commit 5cc7ebb

Browse files
committed
ci: update actions
Signed-off-by: Carlos Alexandro Becker <[email protected]>
1 parent 702f5f9 commit 5cc7ebb

4 files changed

Lines changed: 54 additions & 107 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 27 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,21 @@ jobs:
3737
- goreleaser
3838
- goreleaser-pro
3939
steps:
40-
-
41-
name: Checkout
40+
- name: Checkout
4241
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4342
with:
4443
fetch-depth: 0
45-
-
46-
name: Set up Go
44+
- name: Set up Go
4745
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
4846
with:
4947
go-version: stable
50-
-
51-
name: Check
48+
- name: Check
5249
uses: ./
5350
with:
5451
version: ${{ matrix.version }}
5552
args: check --verbose
5653
workdir: ./test
57-
-
58-
name: GoReleaser
54+
- name: GoReleaser
5955
if: ${{ !(github.event_name == 'pull_request' && matrix.distribution == 'goreleaser-pro') }}
6056
uses: ./
6157
env:
@@ -81,30 +77,25 @@ jobs:
8177
- true
8278
- false
8379
steps:
84-
-
85-
name: Checkout
80+
- name: Checkout
8681
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8782
with:
8883
fetch-depth: 0
89-
-
90-
name: Set up Go
84+
- name: Set up Go
9185
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
9286
with:
9387
go-version: 1.18
94-
-
95-
name: Install cosign
88+
- name: Install cosign
9689
if: matrix.cosign
9790
uses: sigstore/cosign-installer@cad07c2e89fa2edd6e2d7bab4c1aa38e53f76003 # v4.1.1
98-
-
99-
name: GoReleaser
91+
- name: GoReleaser
10092
if: ${{ !(github.event_name == 'pull_request' && matrix.distribution == 'goreleaser-pro') }}
10193
uses: ./
10294
with:
10395
distribution: ${{ matrix.distribution }}
10496
version: ${{ matrix.version }}
10597
install-only: true
106-
-
107-
name: Check
98+
- name: Check
10899
if: ${{ !(github.event_name == 'pull_request' && matrix.distribution == 'goreleaser-pro') }}
109100
run: |
110101
goreleaser check --verbose
@@ -120,34 +111,29 @@ jobs:
120111
- macos-latest
121112
- windows-latest
122113
steps:
123-
-
124-
name: Checkout
114+
- name: Checkout
125115
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
126116
with:
127117
fetch-depth: 0
128-
-
129-
name: Set up Go
118+
- name: Set up Go
130119
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
131120
with:
132121
go-version: 1.18
133-
-
134-
name: Import GPG key
122+
- name: Import GPG key
135123
id: import_gpg
136124
uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0
137125
with:
138126
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY_TEST }}
139127
passphrase: ${{ secrets.PASSPHRASE_TEST }}
140-
-
141-
name: Check
128+
- name: Check
142129
uses: ./
143130
with:
144131
version: latest
145132
args: -f .goreleaser-signing.yml check --verbose
146133
workdir: ./test
147134
env:
148135
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
149-
-
150-
name: GoReleaser
136+
- name: GoReleaser
151137
uses: ./
152138
with:
153139
version: latest
@@ -159,30 +145,25 @@ jobs:
159145
upload-artifact:
160146
runs-on: ubuntu-latest
161147
steps:
162-
-
163-
name: Checkout
148+
- name: Checkout
164149
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
165150
with:
166151
fetch-depth: 0
167-
-
168-
name: Set up Go
152+
- name: Set up Go
169153
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
170154
with:
171155
go-version: 1.18
172-
-
173-
name: Check
156+
- name: Check
174157
uses: ./
175158
with:
176159
args: check --verbose
177160
workdir: ./test
178-
-
179-
name: GoReleaser
161+
- name: GoReleaser
180162
uses: ./
181163
with:
182164
args: release --skip=publish --clean --snapshot
183165
workdir: ./test
184-
-
185-
name: Upload assets
166+
- name: Upload assets
186167
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
187168
with:
188169
name: myapp
@@ -191,24 +172,20 @@ jobs:
191172
dist:
192173
runs-on: ubuntu-latest
193174
steps:
194-
-
195-
name: Checkout
175+
- name: Checkout
196176
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
197177
with:
198178
fetch-depth: 0
199-
-
200-
name: Set up Go
179+
- name: Set up Go
201180
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
202181
with:
203182
go-version: 1.18
204-
-
205-
name: GoReleaser
183+
- name: GoReleaser
206184
uses: ./
207185
with:
208186
args: release --config .goreleaser-dist.yml --skip=publish --clean --snapshot
209187
workdir: ./test
210-
-
211-
name: Check dist
188+
- name: Check dist
212189
run: |
213190
tree -nh ./test/_output
214191
@@ -225,29 +202,24 @@ jobs:
225202
- goreleaser-pro
226203
- goreleaser
227204
steps:
228-
-
229-
name: Checkout
205+
- name: Checkout
230206
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
231207
with:
232208
fetch-depth: 0
233-
-
234-
name: Set up Go
209+
- name: Set up Go
235210
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
236211
with:
237212
go-version: 1.18
238-
-
239-
name: GoReleaser
213+
- name: GoReleaser
240214
uses: ./
241215
with:
242216
install-only: true
243217
distribution: ${{ matrix.distribution }}
244218
version: nightly
245219
env:
246220
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
247-
-
248-
name: Check
221+
- name: Check
249222
run: |
250223
goreleaser check -f ./test/.goreleaser.yml
251224
goreleaser --version
252225
goreleaser --version | grep nightly
253-

‎.github/workflows/release-major-tag.yml‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,15 @@ jobs:
2828
tag:
2929
runs-on: ubuntu-latest
3030
steps:
31-
-
32-
name: Checkout
31+
- name: Checkout
3332
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3433
with:
3534
fetch-depth: 0
36-
-
37-
name: Git config
35+
- name: Git config
3836
run: |
3937
git config user.name "github-actions[bot]"
4038
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
41-
-
42-
name: Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }}
39+
- name: Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }}
4340
run: git tag -f ${{ github.event.inputs.major_version }} ${{ github.event.inputs.target }}
44-
-
45-
name: Push
41+
- name: Push
4642
run: git push origin ${{ github.event.inputs.major_version }} --force

‎.github/workflows/test.yml‎

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,24 @@ jobs:
1919
test:
2020
runs-on: ubuntu-latest
2121
steps:
22-
-
23-
name: Checkout
22+
- name: Checkout
2423
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2524
with:
2625
fetch-depth: 0
27-
-
28-
name: Setup Node.js
29-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0
26+
- name: Setup Node.js
27+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
3028
with:
3129
node-version-file: '.node-version'
3230
cache: npm
33-
-
34-
name: Install cosign
31+
- name: Install cosign
3532
uses: sigstore/cosign-installer@cad07c2e89fa2edd6e2d7bab4c1aa38e53f76003 # v4.1.1
36-
-
37-
name: Install dependencies
33+
- name: Install dependencies
3834
run: npm ci
39-
-
40-
name: Test
35+
- name: Test
4136
run: npm test
4237
env:
4338
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
-
45-
name: Upload coverage
39+
- name: Upload coverage
4640
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
4741
with:
4842
files: ./coverage/clover.xml

‎.github/workflows/validate.yml‎

Lines changed: 16 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -19,54 +19,43 @@ jobs:
1919
lint:
2020
runs-on: ubuntu-latest
2121
steps:
22-
-
23-
name: Checkout
22+
- name: Checkout
2423
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25-
-
26-
name: Setup Node.js
27-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0
24+
- name: Setup Node.js
25+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
2826
with:
2927
node-version-file: '.node-version'
3028
cache: npm
31-
-
32-
name: Install dependencies
29+
- name: Install dependencies
3330
run: npm ci
34-
-
35-
name: Format check
31+
- name: Format check
3632
run: npm run format-check
37-
-
38-
name: Lint
33+
- name: Lint
3934
run: npm run lint
4035

4136
build:
4237
runs-on: ubuntu-latest
4338
steps:
44-
-
45-
name: Checkout
39+
- name: Checkout
4640
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
47-
-
48-
name: Setup Node.js
41+
- name: Setup Node.js
4942
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0
5043
with:
5144
node-version-file: '.node-version'
5245
cache: npm
53-
-
54-
name: Install dependencies
46+
- name: Install dependencies
5547
run: npm ci --ignore-scripts
56-
-
57-
name: Rebuild dist
48+
- name: Rebuild dist
5849
run: npm run build
59-
-
60-
name: Compare dist
50+
- name: Compare dist
6151
id: diff
6252
run: |
6353
if [ "$(git diff --ignore-space-at-eol dist | wc -l)" -gt "0" ]; then
6454
echo "Detected uncommitted changes after build. Run 'npm run build' and commit dist/." >&2
6555
git diff dist
6656
exit 1
6757
fi
68-
-
69-
name: Upload built dist on failure
58+
- name: Upload built dist on failure
7059
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
7160
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
7261
with:
@@ -76,20 +65,16 @@ jobs:
7665
vendor:
7766
runs-on: ubuntu-latest
7867
steps:
79-
-
80-
name: Checkout
68+
- name: Checkout
8169
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
82-
-
83-
name: Setup Node.js
70+
- name: Setup Node.js
8471
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0
8572
with:
8673
node-version-file: '.node-version'
8774
cache: npm
88-
-
89-
name: Refresh package-lock.json
75+
- name: Refresh package-lock.json
9076
run: npm install --package-lock-only
91-
-
92-
name: Compare package-lock.json
77+
- name: Compare package-lock.json
9378
run: |
9479
if [ -n "$(git status --porcelain -- package-lock.json)" ]; then
9580
echo "package-lock.json is out of sync with package.json. Run 'npm install' and commit." >&2

0 commit comments

Comments
 (0)