Skip to content

Commit

Permalink
Publish web-features to NPM on v1.2.3 style tag (#1479)
Browse files Browse the repository at this point in the history
  • Loading branch information
foolip authored Jul 26, 2024
1 parent 7792484 commit 24abc6d
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/publish_web-features.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish web-features

on:
push:
# Tags on the form v1.2.3 are for releases. Any other tags are ignored.
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

env:
package_dir: "packages/web-features"

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- run: npm ci
- run: npm test
publish:
if: github.repository == 'web-platform-dx/web-features'
runs-on: ubuntu-latest
needs: "test"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm run build
- run: npm publish
working-directory: ${{ env.package_dir }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 24abc6d

Please sign in to comment.