Publish #3
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 | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
type: string | |
description: New version to set | |
required: true | |
tag: | |
type: string | |
description: Optional tag to use for this publish | |
default: latest | |
required: false | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.ACCESS_TOKEN }} | |
- uses: actions/setup-node@v2 | |
- name: Install | |
run: yarn install --frozen-lockfile | |
# preversion script takes care of linting, building and testing | |
- name: Publish | |
run: | | |
git config --global user.name 'Nitzan Hen' | |
git config --global user.email 'code@nitzanhen.net' | |
yarn publish --new-version ${{ github.event.inputs.version }} --tag ${{ github.event.inputs.tag }} --access public | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Push version & tag | |
run: | | |
git push | |
git push --tags |