-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (38 loc) · 1.22 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
name: Create Release
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Build
run: |
npm run build
cp --force LICENSE.txt system/.
cp --force README.md system/.
SYSTEM_VERSION=$(grep -oP '(?<="version": ")[^"]+' system/system.json | tr -d '\n')
perl -pi -E "s|/latest/download/ac2d20\\.zip|/download/release-$SYSTEM_VERSION/ac2d20.zip|" system/system.json
echo "systemVersion=$SYSTEM_VERSION" >> $GITHUB_ENV
- run: cd system && zip -r ../ac2d20.zip ./*
- name: Create Version Release
id: create_version_release
uses: ncipollo/release-action@v1
with:
allowUpdates: false
artifacts: './system/system.json, ./ac2d20.zip'
draft: false
name: release-${{ env.systemVersion }}
prerelease: true
tag: release-${{ env.systemVersion }}
token: ${{ secrets.GITHUB_TOKEN }}