Skip to content

Deploy Pre-release #195

Deploy Pre-release

Deploy Pre-release #195

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