-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (71 loc) · 2.04 KB
/
ci.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: pipeline
on: [ push ]
env:
TAG_NAME: $(echo "${{ github.ref_name }}" | sed 's/[^a-zA-Z0-9._-]/_/g')
NVM_NODE_VERSION: 18
PROJECT: colors
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-and-lint:
runs-on:
group: default-runners
labels: self-hosted
steps:
- uses: actions/checkout@v4
env:
CURRENT_RUNNER: ${{ runner.name }}
- name: setup node
uses: ./.github/actions/node-manager
with:
node-version: ${{ env.NVM_NODE_VERSION }}
- name: build-and-lint
shell: bash
run: |
yarn install --production=false --frozen-lockfile
yarn build
yarn lint
dry-run-publish:
needs: [ build-and-lint ]
runs-on:
group: default-runners
labels: self-hosted
steps:
- uses: actions/checkout@v4
env:
CURRENT_RUNNER: ${{ runner.name }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: setup node
uses: ./.github/actions/node-manager
with:
node-version: ${{ env.NVM_NODE_VERSION }}
- name: dry-run-publish
shell: bash
run: |
yarn install --production=false --frozen-lockfile
yarn build
npm publish --access public --tag latest --dry-run
publish-npm:
needs: [ dry-run-publish ]
# TODO: not working yet
if: false
# if: github.ref == 'refs/heads/master'
runs-on:
group: default-runners
labels: self-hosted
steps:
- uses: actions/checkout@v4
env:
CURRENT_RUNNER: ${{ runner.name }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: setup node
uses: ./.github/actions/node-manager
with:
node-version: ${{ env.NVM_NODE_VERSION }}
- name: publish-npm
shell: bash
run: |
yarn install --production=false --frozen-lockfile
yarn build
npm publish --access public --tag latest