-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (46 loc) · 1.45 KB
/
main.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
name: Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
environment: gcp
steps:
- uses: docker/login-action@v2
with:
registry: us-east1-docker.pkg.dev
username: _json_key
password: ${{ secrets.GAR_JSON_KEY }}
- uses: actions/setup-node@v3
with:
node-version: '18.7.0'
- run: corepack enable
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Git
run: |
git config user.name "GitHub Bot"
git config user.email "[email protected]"
- uses: nrwl/nx-set-shas@v2
- run: yarn install --frozen-lockfile
- name: Build
run: yarn nx run-many --configuration=production --target=build --parallel=3
- name: Set NPM registry
run: npm config --global set @mondaydotcomorg:registry https://registry.npmjs.org/
- name: Set NPM auth token
run: npm config --global set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}"
- name: Create & publish a new version
shell: bash
run: yarn nx run-many --parallel=1 --target=version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Tag last-release
shell: bash
run: |
git tag -f last-release
git push origin last-release --force