-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.63 KB
/
create-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
48
49
50
name: Create Release
'on':
push:
branches:
- main
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Move All Files into Code Dir
run: mv * code | mkdir code
- name: Download encounterplus/module-packer
run: git clone https://github.com/encounterplus/module-packer
- name: Build Release .module File
run: |
cd module-packer/source/
python3 launcher.py run --path "../../code"
- name: Build Release .PDF File
run: |
cd module-packer/source/
python3 launcher.py run --path "../../code" --output pdf
- name: Get Hash
id: hash
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Calculate build number
id: build-number
run: |
BUILD_NUMBER=$((2000+$GITHUB_RUN_NUMBER)) #to stay above jenkins
echo "Build number: $BUILD_NUMBER"
echo ::set-output name=BUILD_NUMBER::$BUILD_NUMBER
- name: Puts the release on GitHub
uses: ncipollo/release-action@v1
with:
artifacts: "code/open5e-encountermodule.module, code/open5e-encountermodule.pdf"
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.build-number.outputs.BUILD_NUMBER }}
name: Open5e Ecounter Module - ${{ steps.build-number.outputs.BUILD_NUMBER }} - ${{ steps.hash.outputs.sha_short }}
prerelease: true