-
Notifications
You must be signed in to change notification settings - Fork 51
41 lines (39 loc) · 1.16 KB
/
publish.yaml
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
41
name: Publish packages
on:
workflow_dispatch:
inputs:
version:
type: choice
description: What version do you want to publish?
required: true
options:
- patch
- minor
- major
jobs:
Publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18'
token: ${{secrets.MARTIJN_PAT}}
# - name: Set git config
# run: |
# git config --global user.name "martijnvdbrug"
# git config --global user.email "[email protected]"
- name: Set NPM token
run: npm set //registry.npmjs.org/:_authToken ${{secrets.NPM_PUBLISH_TOKEN}}
- name: Install dependencies
run: yarn
- name: Create, commit and push version
run: yarn lerna version ${{ github.event.inputs.version }} --force-publish --yes
- name: Build
run: yarn build
- name: Stash changes that build might have caused
run: git stash
- name: Publish
run: yarn lerna publish from-package --yes