Workflow file for this run
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: 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' | |
- name: Bump version | |
run: | | |
git config --global user.name "ReactNativeBoilerplate Bot" | |
git config --global user.email "j.dolle.bot@thecodingmachine.com" | |
npm --no-git-tag-version version ${{ github.event.release.name }} | |
- name: Publish to NPM | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- 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 }} |