-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (36 loc) · 1.49 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
name: Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- uses: actions/checkout@v2
- name: Substitute version in manifest
uses: microsoft/variable-substitution@v1
with:
files: 'system.json'
env:
version: ${GITHUB_REF_NAME#v}
manifest: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/system.json
download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/candelafvtt-${GITHUB_REF_NAME}.zip
- name: Install dependencies and build
run: |
npm install -g yarn
yarn install
sh build.sh ${GITHUB_REF_NAME#v}
echo "VERSION=${GITHUB_REF_NAME}" >> "$GITHUB_ENV"
- name: Update release with files
uses: ncipollo/release-action@v1
with:
allowUpdates: true
name: ${{ github.event.release.name }}
draft: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: 'dist/system.json,dist/candelafvtt-${{ env.VERSION }}.zip'
tag: ${{ github.event.release.tag_name }}
body: ${{ github.event.release.body }}