Re-enable NPM publish [ci patch] #18
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 to NPM | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 💾 Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: ⚙️ Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.18.0' | |
registry-url: 'https://registry.npmjs.org' | |
- name: 🧰 Install | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: install | |
- name: 🏷️ Tag | |
id: tagging | |
uses: anothrNick/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MAJOR_STRING_TOKEN: \[ci major\] | |
MINOR_STRING_TOKEN: \[ci minor\] | |
PATCH_STRING_TOKEN: \[ci patch\] | |
NONE_STRING_TOKEN: \[ci skip\] | |
BRANCH_HISTORY: last | |
DRY_RUN: true | |
- name: 👊 Bump | |
run: | | |
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
git config user.name github-actions[bot] | |
yarn version --new-version ${{ steps.tagging.outputs.new_tag }} --message "Version bump to v${{ steps.tagging.outputs.new_tag }} [ci skip]" | |
git push --follow-tags | |
- name: 📦 Publish | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |