-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (58 loc) · 2.04 KB
/
main.yaml
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
59
60
61
62
63
64
65
66
name: Shadowrun 5 - CI/CD
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Version
shell: bash
id: get-version
run: echo "::set-output name=version::$(node ./.github/workflows/get-version.js)"
- name: Zip Files
working-directory: ./
run: zip -r ./sr5.zip *
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_latest
uses: microsoft/variable-substitution@v1
with:
files: './system.json'
env:
url: https://github.com/${{github.repository}}
manifest: https://github.com/${{github.repository}}/releases/latest/download/system.json
download: https://github.com/${{github.repository}}/releases/latest/download/sr5.zip
- name: Update Latest Release
id: create_latest_release
uses: ncipollo/release-action@v1
if: endsWith(github.ref, 'main')
with:
allowUpdates: true
name: Latest
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './system.json, ./sr5.zip'
tag: latest
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_version
uses: microsoft/variable-substitution@v1
with:
files: './system.json'
env:
url: https://github.com/${{github.repository}}
manifest: https://github.com/${{github.repository}}/releases/latest/download/system.json
download: https://github.com/${{github.repository}}/releases/download/${{steps.get-version.outputs.version}}/sr5.zip
- name: Create Version Release
id: create_version_release
uses: ncipollo/release-action@v1
with:
allowUpdates: false
name: Release ${{ steps.get-version.outputs.version }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './system.json,./sr5.zip'
tag: ${{ steps.get-version.outputs.version }}