-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (52 loc) · 1.86 KB
/
release.yml
File metadata and controls
65 lines (52 loc) · 1.86 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Release
on:
push:
branches:
- main
jobs:
check-build-release:
name: Check, Build, and Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@v3.4.1
with:
node-version-file: '.nvmrc'
- name: Install Dependencies (with Cache)
uses: ./.github/actions/yarn-install-wcache
- name: Git Identity
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: yarn nx run workspace:packages:build
- name: Test
run: yarn test
- name: Check Types (TypeScript)
run: yarn nx run workspace:packages:check-types
# - name: Formatting Check
# run: yarn nx run workspace:packages:check-formatting
# - name: Linting Check
# run: yarn nx run workspace:packages:lint
- name: Set NPM Auth
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version
run: npx lerna version --yes --no-private --force-publish --create-release github
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Release
run: npx lerna publish from-git --yes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}