-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* NPM publish from GHA Align build.yml with similar projects * Tweaks based on review
- Loading branch information
1 parent
4192638
commit f49e8e6
Showing
2 changed files
with
16 additions
and
85 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,26 @@ | ||
name: Test & Build | ||
|
||
name: build | ||
on: | ||
release: | ||
types: [created] | ||
push: | ||
branches: '*' | ||
pull_request: | ||
branches: '*' | ||
|
||
branches: | ||
- '**' | ||
jobs: | ||
test-build: | ||
name: Run tests and build project | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
node-version: '20.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
cache: npm | ||
- run: npm ci | ||
- run: npm run test:coverage | ||
- run: npm run build | ||
- run: npm publish | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |