Skip to content

Commit e86d251

Browse files
authored
Merge pull request #2973 from tanem/publishing
Add release workflow
2 parents 63ede8e + c193413 commit e86d251

3 files changed

Lines changed: 168 additions & 185 deletions

File tree

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release
2+
3+
on:
4+
schedule:
5+
- cron: '0 9 * * 1' # Every Monday at 9:00 AM UTC
6+
workflow_dispatch:
7+
branches:
8+
- master
9+
10+
permissions:
11+
contents: write
12+
id-token: write
13+
packages: write
14+
15+
jobs:
16+
release:
17+
runs-on: ubuntu-latest
18+
if: github.ref == 'refs/heads/master'
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v6
23+
with:
24+
fetch-depth: 0
25+
token: ${{ secrets.RELEASE_TOKEN }}
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v6
29+
with:
30+
node-version-file: '.nvmrc'
31+
check-latest: true
32+
registry-url: 'https://registry.npmjs.org'
33+
34+
- name: Configure git
35+
run: |
36+
git config user.name "github-actions[bot]"
37+
git config user.email "github-actions[bot]@users.noreply.github.com"
38+
39+
- name: Install dependencies
40+
run: npm ci
41+
42+
- name: Build
43+
run: npm run build
44+
45+
- name: Release
46+
run: npm run release
47+
env:
48+
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)