Skip to content

Commit 446798a

Browse files
authored
fix: fix publish (#95)
1 parent 043f149 commit 446798a

File tree

1 file changed

+44
-25
lines changed

1 file changed

+44
-25
lines changed

.github/workflows/release-please.yaml

Lines changed: 44 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,65 +2,84 @@
22
# request. This PR is opened when we have a new commit to main.
33
# See:
44
# https://github.com/googleapis/release-please
5-
name: Release Please
5+
name: CI main
66
on:
77
push:
88
branches:
99
- main
1010
jobs:
11-
release-please:
12-
runs-on: ubuntu-20.04
11+
test:
12+
runs-on: ubuntu-latest
1313

1414
strategy:
1515
matrix:
1616
node-version: [12.x, 14.x, 16.x, 18.x]
1717

18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
22+
- name: Setup Node ${{ matrix.node-version }}
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Lint
31+
run: npm run lint
32+
33+
- name: Test
34+
run: npm test
35+
36+
- name: Report coverage
37+
run: npm run report-coverage
38+
39+
- name: Store coverage artifacts
40+
uses: actions/upload-artifact@v3
41+
with:
42+
name: build-artifacts
43+
path: |
44+
./artifacts/**/*.*
45+
46+
release-please:
47+
runs-on: ubuntu-latest
48+
needs: 'test'
49+
1850
steps:
1951
- uses: google-github-actions/release-please-action@v3
2052
id: release
2153
with:
2254
token: ${{ secrets.GITHUB_TOKEN }}
2355
release-type: node
2456
package-name: wait-port
25-
57+
2658
# If the 'release please' action has been performed, we can actually
2759
# deploy the website.
2860
# Note: *every* step here needs to check the 'release_created' flag.
2961
- name: Checkout
30-
uses: actions/checkout@v2
62+
uses: actions/checkout@v3
3163
if: ${{ steps.release.outputs.release_created }}
3264

3365
# Setup the right version of Node.js.
34-
- name: Setup Node ${{ matrix.node-version }}
35-
uses: actions/setup-node@v1
66+
- name: Setup Node
67+
uses: actions/setup-node@v3
3668
with:
37-
node-version: ${{ matrix.node-version }}
69+
node-version: '*'
3870
registry-url: 'https://registry.npmjs.org'
3971
if: ${{ steps.release.outputs.release_created }}
4072

73+
- name: Install dependencies
74+
run: npm ci
75+
if: ${{ steps.release.outputs.release_created }}
76+
4177
# Fixup Git URLs, see:
4278
# https://stackoverflow.com/questions/70663523/the-unauthenticated-git-protocol-on-port-9418-is-no-longer-supported
4379
- name: Fix up git URLs
4480
run: echo -e '[url "https://github.com/"]\n insteadOf = "git://github.com/"' >> ~/.gitconfig
4581
if: ${{ steps.release.outputs.release_created }}
4682

47-
# Lint, test, and report coverage.
48-
- name: test
49-
run: |
50-
npm ci
51-
npm run lint
52-
npm test
53-
npm run report-coverage
54-
if: ${{ steps.release.outputs.release_created }}
55-
56-
- name: store coverage artifacts
57-
uses: actions/upload-artifact@v3
58-
with:
59-
name: build-artifacts
60-
path: |
61-
./artifacts/**/*.*
62-
if: ${{ steps.release.outputs.release_created }}
63-
6483
- run: npm publish
6584
env:
6685
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)