-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (33 loc) · 955 Bytes
/
weekly-release.yml
File metadata and controls
42 lines (33 loc) · 955 Bytes
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
name: Weekly Release
on:
workflow_dispatch:
schedule:
- cron: "0 16 * * 6"
env:
token: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: latest
- name: Remove version suffix
run: |
sed -i 's/"version": "\([0-9]\+\.[0-9]\+\.[0-9]\+\)-[0-9]\+",/"version": "\1",/g' package.json
- name: Update CHANGELOG.md
run: |
today=$(date +'%Y-%m-%d')
sed -i "s/upcoming/$today/" CHANGELOG.md
- name: Commit changes
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git add .
git commit -am "release: $(jq -r '.version' package.json)"
git push