-
-
Notifications
You must be signed in to change notification settings - Fork 10
103 lines (86 loc) · 2.95 KB
/
devbuild.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Continuous
on:
push:
branches:
- develop
jobs:
continuous:
name: "Continuous Pre-Release"
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
check-latest: true
cache: 'gradle'
- uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper
- uses: luangong/setup-install4j@v1
with:
version: '11.0'
license: ${{ secrets.INSTALL4J_LICENSE }}
- name: Remove install4j script
run: |
rm install4j_linux-x64_*.sh
- name: Set Permissions
run: |
chmod +x gradlew
- name: Build with Gradle
run: |
./gradlew build --info --full-stacktrace
./gradlew media --info --full-stacktrace
- name: Collect files
run: |
mkdir continuous
cp serverpackcreator-api/build/libs/*.jar continuous/
cp serverpackcreator-app/build/libs/*.jar continuous/
cp serverpackcreator-plugin-example/build/libs/*.jar continuous/
cp media/*.dmg continuous/
cp media/*.sh continuous/
cp media/*.exe continuous/
rm -f continuous/output.txt continuous/*plain.jar
- name: Generate checksum
uses: jmgilman/actions-generate-checksum@v1
with:
patterns: |
continuous/*
- name: Collect checksum
run: |
cp checksum.txt continuous/
- name: Upload to GitHub Releases
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "continuous"
prerelease: true
title: "Development Build"
files: |
continuous/*
- name: Delete drafts
uses: hugo19941994/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get source archives
run: |
wget -O continuous/source.zip https://github.com/Griefed/ServerPackCreator/archive/refs/tags/continuous.zip
wget -O continuous/source.tar.gz https://github.com/Griefed/ServerPackCreator/archive/refs/tags/continuous.tar.gz
- name: Cleanup continuous
id: action-ssh
uses: tiyee/[email protected]
with:
host: ${{ secrets.SPCUPLOAD_HOST }}
username: ${{ secrets.SPCUPLOAD_USERNAME }}
privateKey: ${{ secrets.SPCUPLOAD_KEY }}
command: 'rm -rf ~/spc/continuous'
- name: Copy folder content recursively to remote
uses: nogsantos/scp-deploy@master
with:
src: ./continuous
host: ${{ secrets.SPCUPLOAD_HOST }}
remote: "${{ secrets.SPCUPLOAD_TARGET }}"
user: ${{ secrets.SPCUPLOAD_USERNAME }}
key: ${{ secrets.SPCUPLOAD_KEY }}