-
-
Notifications
You must be signed in to change notification settings - Fork 355
77 lines (77 loc) · 2.57 KB
/
deploy_prerelease.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
name: Deploy Pre-release
on:
workflow_dispatch:
env:
CURR_VER: 0.0.0.0
SUPPORTED: " for MC 1.19.* & 1.20.* & 1.21.*"
jobs:
deploy_prerelease:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['21']
name: Deploying Towny Prerelease
steps:
- name: checkout repo content
uses: actions/checkout@v3 # checkout the repository content to github runner.
- name: set up eclipse temurin
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
java-package: jdk
cache: 'maven'
- name: compile towny with maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -B clean package -DskipTests=false
- name: setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: get sponsors.txt using PHP
run: php ./.github/workflows/prerelease/get_sponsors.php
- name: create staging dir
run: mkdir staging && cp sponsors.txt staging
- name: setup python
uses: actions/setup-python@v3
with:
python-version: 3.8 #install the python needed
- name: execute sponsortable.py
run: python ./.github/workflows/prerelease/sponsortable.py
- name: execute preRelease.py
id: prerelease_py
run: python ./.github/workflows/prerelease/prerelease.py
- name: create pre-release
uses: softprops/action-gh-release@v1
with:
body_path: ./staging/prerelease.txt
prerelease: true
token: ${{ github.token }}
tag_name: ${{ env.CURR_VER }}
name: ${{ env.CURR_VER }}${{ env.SUPPORTED }}
files: |
./Towny/target/towny-${{ env.CURR_VER }}.jar
env:
GITHUB_REPOSITORY: my_gh_org/my_gh_repo
- name: prepare maven settings.xml
uses: s4u/[email protected]
with:
githubServer: false
servers: |
[{
"id": "nexus",
"username": "${{ secrets.GLAREREPO_USERNAME }}",
"password": "${{ secrets.GLAREREPO_PASSWORD }}"
}]
- name: deploy to glaremaster repo
run: mvn deploy
- name: deploy javadoc to github pages
uses: MathieuSoysal/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
javadoc-branch: javadoc
java-version: 21
target-folder: javadoc/prerelease
javadoc-source-folder: target/reports/apidocs
project: maven