Skip to content

Commit b027fa5

Browse files
committed
chore: create github action release workflow
[ci skip]
1 parent 2479aae commit b027fa5

2 files changed

Lines changed: 50 additions & 1 deletion

File tree

.github/workflows/release-rc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
build-and-release:
8-
if: github.actor == 'vbersch' || github.actor == 'Lukas742'
8+
if: github.actor == 'MarcusNotheis' || github.actor == 'vbersch' || github.actor == 'Lukas742'
99
runs-on: ubuntu-latest
1010

1111
steps:

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: 'Release RC'
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_type:
7+
description: 'Release Type: patch | minor | major'
8+
required: true
9+
default: 'patch'
10+
11+
jobs:
12+
build-and-release:
13+
if: github.actor == 'MarcusNotheis' || github.actor == 'vbersch' || github.actor == 'Lukas742'
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v2.3.2
18+
with:
19+
token: ${{ secrets.ACCESS_TOKEN }}
20+
21+
- name: Setup Node.js environment
22+
uses: actions/setup-node@v2.1.0
23+
with:
24+
node-version: 12.x
25+
26+
- name: Install, test and build
27+
run: |
28+
yarn install
29+
yarn test
30+
yarn build
31+
32+
- name: 'npm auth'
33+
run: |
34+
npm config set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN
35+
npm config set //registry.npmjs.org/:username=${NPM_USERNAME}
36+
npm config set //registry.npmjs.org/:email=${NPM_EMAIL}
37+
env:
38+
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39+
NPM_USERNAME: ${{ secrets.NPM_USERNAME }}
40+
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
41+
42+
- name: 'Release RC'
43+
run: |
44+
${GITHUB_WORKSPACE}/node_modules/.bin/lerna publish ${{ github.event.inputs.name }} \
45+
--conventional-graduate \
46+
--create-release github
47+
env:
48+
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
49+

0 commit comments

Comments
 (0)