Publish 2.0.4 (@osyrisrblx) #7
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 | |
run-name: Publish ${{ inputs.version }} (@${{ github.actor }}) | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
required: true | |
type: string | |
jobs: | |
publish: | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/[email protected] | |
with: | |
token: ${{ secrets.pat }} | |
- name: Install NPM Dependencies | |
uses: bahmutov/npm-install@v1 | |
- name: Publish | |
run: | | |
git config user.name "GitHub Actions" | |
git config user.email "[email protected]" | |
echo "//registry.npmjs.org/:_authToken=${{ secrets.npm_token }}" > .npmrc | |
npm version ${{ inputs.version }} | |
npm publish | |
git push | |
git push --tags |