-
-
Notifications
You must be signed in to change notification settings - Fork 10
52 lines (42 loc) · 1.52 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: Build-Test-Release
on:
push:
branches:
- master
- alpha
jobs:
build-test-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
# Keep in sync with volta -> node version in package.json
node-version: 20
- name: Install dependencies
run: yarn
- name: Sync with crowdin
env:
BLOOM_CROWDIN_TOKEN: ${{ secrets.BLOOM_CROWDIN_TOKEN }}
run: |
if [ "${{ github.ref }}" = "refs/heads/master" ]; then
yarn strings:sync
else
yarn strings:download
fi
- name: Build package
run: yarn build
- name: Run tests
run: yarn test
- name: Clean up package.json
# We used to use the clean-publish package to do this, but when
# we switched to using semantic-release, we had to do it manually.
run: npm pkg delete scripts && npm pkg delete devDependencies && npm pkg delete dependencies
- name: Publish package
id: semantic_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release