Skip to content

Publish

Publish #3

Workflow file for this run

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