-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (43 loc) · 1.24 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
name: Release
on:
push:
branches:
- master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
release:
name: Build and release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Build dependencies
run: npm run build
- name: Commit and push changes
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git add dist
git commit -m "chore: build dist files" || true
git push origin master
git fetch origin
- name: Install semantic release
shell: bash
run: |-
npm install -g \
semantic-release \
@semantic-release/exec \
@semantic-release/git \
semantic-release-major-tag
- name: Release
shell: bash
# Note: semantic-release can partially fail, but still tag (that's important)
# so make a best effort to continue in case of error
run: npx semantic-release || true