Fix: security pre-proposal contract #64
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 Package to npmjs | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- closed | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: Npmjs | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.NEUTRON_ACCESS_TOKEN }} | |
- name: Git config | |
run: | | |
git config --global user.email "${{ secrets.NEUTRON_EMAIL }}" | |
git config --global user.name "${{ secrets.NEUTRON_USER }}" | |
- name: Apply version bump (patch) | |
run: yarn version --patch | |
- name: Git push version bump | |
run: git push origin main --follow-tags --force | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
registry-url: 'https://registry.npmjs.org' | |
# Defaults to the user or organization that owns the workflow file | |
scope: '@neutron-org' | |
- run: yarn | |
- run: yarn build | |
- run: yarn publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_ACCESS_TOKEN }} |