Skip to content

fix(cd): npm publish fix #5

fix(cd): npm publish fix

fix(cd): npm publish fix #5

name: Release new boilerplate version
on:
release:
types: [published]
jobs:
publish:
if: "!github.event.release.prerelease"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.release.target_commitish }}
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- uses: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: |
git config --global user.name "ReactNativeBoilerplate Bot"
git config --global user.email "[email protected]"
npm --no-git-tag-version version ${{ github.event.release.name }}
- name: Commit and push
run: |
git add .
git commit -am "bump(version): tag boilerplate to version ${{ github.event.release.name }}"
git push
env:
github-token: ${{ secrets.GITHUB_TOKEN }}