-
Notifications
You must be signed in to change notification settings - Fork 26
58 lines (49 loc) · 1.5 KB
/
build.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
53
54
55
56
57
58
name: Release
on:
workflow_dispatch:
inputs:
version:
required: true
description: 'Release version'
jobs:
release_pr:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Fetch files and checkout
run: |
git fetch --all
git checkout releases
git checkout main .
- name: Build release
run: |
npm ci
npm run build
- name: Check in files
run: |
git add -f build/ Sources/
- name: Commit build files
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Release build ${{ github.event.inputs.version }} [ci release]"
commit_options: '--allow-empty'
skip_checkout: true
branch: "releases"
- name: Collect commit ranges
run: |
bash ./scripts/changelog.sh > ${{ github.workspace }}-CHANGELOG.txt
- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body_path: ${{ github.workspace }}-CHANGELOG.txt
draft: false
prerelease: false
tag_name: ${{ github.event.inputs.version }}
target_commitish: "releases"