-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (51 loc) · 1.36 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Publish
on:
push:
branches:
- chore/DS-1434-prerelease
- main
- release/next
- release/alpha
- release/beta
jobs:
publish:
name: Publish package
runs-on: ubuntu-24.04
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Fetch tags
run: git fetch --tags
- name: Tag
run: echo "tag - ${{ github.ref }}"
- name: Check if commit has a tag
id: check_tag
run: |
if [ -n "$(git tag --points-at HEAD)" ]; then
echo "has_tag=true" >> $GITHUB_ENV
else
echo "has_tag=false" >> $GITHUB_ENV
fi
- name: Enable Corepack
if: env.has_tag == 'true'
run: corepack enable
- name: Configure Node.js
if: env.has_tag == 'true'
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies
if: env.has_tag == 'true'
run: yarn --immutable --inline-builds
- name: Build
if: env.has_tag == 'true'
run: yarn build
# - name: Authenticate npm
# run: ./bin/ci/npm-auth.sh
# env:
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Publish
# run: make publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}