-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3c5ec83
commit 2f50345
Showing
1 changed file
with
17 additions
and
21 deletions.
There are no files selected for viewing
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,34 +1,30 @@ | ||
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | ||
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages | ||
|
||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
node-version: 18 | ||
- run: npm ci | ||
- run: npm test | ||
fetch-depth: 0 | ||
|
||
publish-npm: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm ci | ||
- run: npx semantic-release --branches main | ||
node-version: "lts/*" | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Release | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM}} | ||
GITHUB_TOKEN: ${{ secrets.GA }} | ||
NPM_TOKEN: ${{ secrets.NPM }} | ||
run: npx semantic-release |