-
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.
feat: push github actions to publish package
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Publish CI | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.x" | ||
registry-url: "https://npm.pkg.github.com" | ||
scope: "@euler-xyz" | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
- run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
npm version patch | ||
git push | ||
git push --tags | ||
- run: npm publish --access restricted | ||
env: | ||
# NOTE: using the built-in GITHUB token here because we're publishing to THIS repository's packages. | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |