Release & Publish to NPM #7
This file contains hidden or 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 & Publish to NPM | |
| on: workflow_dispatch | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ssh-key: ${{ secrets.DEPLOY_KEY }} | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Initialize Git user | |
| shell: bash | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "[email protected]" | |
| - name: Setup NPM registry | |
| run: | | |
| npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Run release | |
| run: | | |
| yarn release --ci --preRelease=preview | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |