Skip to content

Commit a31230d

Browse files
committed
workflow changes to support release on tag
1 parent 86c783b commit a31230d

File tree

3 files changed

+33
-10
lines changed

3 files changed

+33
-10
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: ['*']
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
15+
- uses: actions/setup-node@v2
16+
with:
17+
node-version: "22"
18+
registry-url: "https://registry.npmjs.org"
19+
20+
- name: Install environment
21+
run: npm ci
22+
23+
- name: Prepare for release
24+
run: npm run prepare
25+
26+
- name: Publish new version to NPM
27+
id: publish-to-npm
28+
run: |
29+
echo "publishing"
30+
npm publish --provenance --access public
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/refresh_downstream.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,3 @@ jobs:
5353
run: |
5454
npm version patch -m "Patch to %s because downstream-browsers.json changed"
5555
git push && git push --tags
56-
57-
- name: Publish new version to NPM
58-
if: steps.tag-release.outcome == 'success'
59-
id: publish-to-npm
60-
run: |
61-
echo "publishing"
62-
npm publish --provenance --access public
63-
env:
64-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@
3030
"typescript": "^5.7.2"
3131
},
3232
"repository": "web-platform-dx/baseline-browser-mapping"
33-
}
33+
}

0 commit comments

Comments
 (0)