Skip to content

Commit 865ce70

Browse files
committed
Additional GitHub Action for manual release
Signed-off-by: Francois Nollen <[email protected]>
1 parent 3597ed9 commit 865ce70

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/manual.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Manual Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version to release: "X.Y.Z" or "prerelease" for beta'
8+
required: true
9+
default: 'prerelease'
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Get tag number
16+
id: get_tag
17+
run: echo ::set-output name=TAG::$(echo $GITHUB_REF | cut -d / -f 3)
18+
- uses: actions/checkout@v2
19+
- uses: actions/setup-node@v1
20+
with:
21+
node-version: 13
22+
registry-url: https://registry.npmjs.org/
23+
- name: Cache node modules
24+
uses: actions/cache@v1
25+
env:
26+
cache-name: cache-node-modules
27+
with:
28+
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
29+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
30+
restore-keys: |
31+
${{ runner.os }}-build-${{ env.cache-name }}-
32+
${{ runner.os }}-build-
33+
${{ runner.os }}-
34+
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
35+
- run: yarn install
36+
- run: git config --local user.email "[email protected]"
37+
- run: git config --local user.name "GitHub Action"
38+
#- run: yarn config set version-sign-git-tag true
39+
- run: |
40+
if [ ${{ github.event.inputs.version }} == "prerelease" ]; then
41+
yarn run release ${{ github.event.inputs.version }} --tag=beta
42+
else
43+
yarn run release ${{ github.event.inputs.version }}
44+
fi
45+
env:
46+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)