gaia-project/.github/workflows/viewer-publish.yml
2021-02-21 01:05:37 +01:00

42 lines
1.2 KiB
YAML

name: Viewer - Version and Release
on:
workflow_dispatch:
inputs:
newversion:
description: "Semantic Version Bump Type (major minor patch)"
default: patch
env:
node_version: 14
defaults:
run:
working-directory: viewer
jobs:
version_and_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.node_version }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.node_version }}
# setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v1.2.1
with:
version: 5.17.1
- run: pnpm install
- run: git config --global user.name github-action
- run: git config --global user.email hello@github.com
- run: yarn version --${{ github.event.inputs.newversion }}
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@master
with:
path: viewer
- run: yarn publish . --new-version ${{ steps.package-version.outputs.current-version}}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}