Merge pull request #1 from H3aven-Labs/feat/node #10
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
name: Publish new version | |
on: | |
push: | |
branches: | |
- 'main' | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.18.2 | |
- name: Set variables | |
run: | | |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.H3_NPM_TOKEN }}" >> .npmrc | |
echo "@h3aven-labs:registry=https://npm.pkg.github.com/" >> .npmrc | |
echo "PACKAGE_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV | |
- name: Deploy | |
run: | | |
npm install | |
npm run build | |
npm publish | |
git tag v${{ env.PACKAGE_VERSION }} | |
git push --tags | |