-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (49 loc) · 1.61 KB
/
release.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
41
42
43
44
45
46
47
48
49
50
51
52
name: Release
on: workflow_dispatch
concurrency:
cancel-in-progress: true
group: release-${{ github.ref }}
jobs:
release:
if: github.ref == 'refs/heads/master'
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20.3.1
cache: "yarn"
- name: Install dependencies
env:
NPM_TIPTAP_TOKEN: ${{ secrets.TIPTAP_PRO_TOKEN }}
run: yarn --immutable
- name: Set git
run: |
git config --global user.name "${NAME}"
git config --global user.email "${EMAIL}"
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
env:
GITHUB_TOKEN: ${{ secrets.SOCIALGROOVYBOT_BOTO_PAT }}
NAME: ${{ secrets.SOCIALGROOVYBOT_NAME }}
EMAIL: ${{ secrets.SOCIALGROOVYBOT_EMAIL }}
- name: Build
run: yarn build
- name: Versionning code
run: GH_TOKEN=${GITHUB_TOKEN} yarn lerna version --force-publish --yes --conventional-commits --create-release github
env:
GITHUB_TOKEN: ${{ secrets.SOCIALGROOVYBOT_BOTO_PAT }}
- name: Setup token
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Deploy to npm
run: yarn lerna publish from-package --yes
- name: Remove .npmrc
if: always()
run: rm .npmrc