-
Notifications
You must be signed in to change notification settings - Fork 33
58 lines (46 loc) · 1.51 KB
/
publish.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
# This workflow builds the project, and publishes it to github-pages, under a per-branch directory.
# e.g. master branch builds to https://xpdota.github.io/event-trigger/master/
# This version runs on a self-hosted runner that has everything preinstalled for faster runs.
name: Publish
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: self-hosted
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: xvfb-run mvn -T3 clean install
- name: Copy release files
run: |
pushd launcher/target/windows/
mkdir -p publish_data/v2
md5sum *.exe *.dll deps/*.jar > publish_data/v2/manifest
cp -r *.exe *.dll deps/ publish_data/v2/
# Legacy updater
cd deps
md5sum *.jar > ../publish_data/manifest
cp *.jar ../publish_data/
popd
- name: Docs with Maven
run: mvn site
- name: Copy docs
run: |
mv target/site/apidocs ./launcher/target/windows/publish_data/javadoc
- name: Deploy release files
uses: JamesIves/[email protected]
with:
folder: ./launcher/target/windows/publish_data
branch: gh-pages
target-folder: ${{ github.ref_name }}
# TODO: artifacts
# TODO: saint coinach auto-update of data