-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.42 KB
/
viewer-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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/[email protected]
with:
version: 5.17.1
- run: pnpm install
- run: git config --global user.name github-actions
- run: git config --global user.email [email protected]
- run: yarn config set version-git-message "Viewer v%s"
- run: yarn version --${{ github.event.inputs.newversion }}
- run: sed -i 's:"container-viewer":"@boardgamers/container-viewer":' package.json
- run: pnpm publish --access public --no-git-checks .
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: git push --follow-tags