Publish SporeModder FX Release #43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish SporeModder FX Release | |
on: | |
workflow_dispatch: | |
jobs: | |
trigger_updater: | |
runs-on: ubuntu-latest | |
name: Trigger SporeModder-FX Updater Workflow | |
steps: | |
- uses: convictional/[email protected] | |
with: | |
owner: emd4600 | |
repo: SporeModder-FX-Updater | |
ref: main | |
workflow_file_name: main.yml | |
github_token: ${{ secrets.PAT }} | |
build_updater: | |
runs-on: ubuntu-latest | |
needs: trigger_updater | |
name: Build Updater | |
steps: | |
- name: Checkout SporeModder-FX-Updater | |
uses: actions/checkout@v4 | |
with: | |
repository: emd4600/SporeModder-FX-Updater | |
- name: Set up JDK 11 for x64 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
architecture: x64 | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- name: Generate release zip | |
run: zip -r "SporeModder FX.zip" "SporeModder FX" | |
- name: Copy updater | |
run: | | |
cp shade/SporeModderFX.Updater.jar SporeModderFX.Updater.jar | |
- name: "Upload build: Updater" | |
uses: actions/[email protected] | |
with: | |
name: SporeModder-FX-Release | |
path: SporeModderFX.Updater.jar | |
- name: "Upload build: Release" | |
uses: actions/[email protected] | |
with: | |
name: SporeModder-FX-Release | |
path: "SporeModder FX.zip" | |
publish_release: | |
name: Publish Release | |
needs: build_updater | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout SporeModder-FX | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Generate changelog | |
id: version_number | |
run: | | |
git log $(git describe --tags --abbrev=0)..HEAD --oneline --format=%s > changelog.txt | |
sed -i -e 's/^/- /' changelog.txt | |
version=$( bash calculate_new_version.sh ) | |
echo "version=$version" >> $GITHUB_OUTPUT | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: SporeModder-FX-Release | |
- name: Release to GitHub | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: SporeModder FX v${{ steps.version_number.outputs.version }} | |
tag_name: v${{ steps.version_number.outputs.version }} | |
body_path: changelog.txt | |
files: | | |
SporeModderFX.Updater.jar | |
SporeModder FX.zip |