Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
emd4600 authored Nov 24, 2023
1 parent 8f88b46 commit 8d7dd18
Showing 1 changed file with 76 additions and 2 deletions.
78 changes: 76 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,84 @@ jobs:
with:
name: SporeModder-FX-jar
path: shade/sporemodderfx.jar

build_updater:
name: Build Updater
needs: build_smfx
runs-on: ubuntu-latest
steps:
- name: Checkout SporeModder-FX
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Checkout Updater
uses: actions/checkout@v1
with:
repository: emd4600/SporeModder-FX-Updater
path: Updater

- name: Update reg_file.txt
run: bash Updater/collect_reg_changes.sh reg_file.txt >> Updater/src/sporemodder/updater/resources/reg_file.txt

- name: Update reg_property.txt
run: bash Updater/collect_reg_changes.sh reg_property.txt >> Updater/src/sporemodder/updater/resources/reg_property.txt

- name: Update reg_type.txt
run: bash Updater/collect_reg_changes.sh reg_type.txt >> Updater/src/sporemodder/updater/resources/reg_type_noforce.txt

- name: Download SporeModderFX.jar
uses: actions/download-artifact@v3
with:
name: SporeModder-FX-jar
path: SporeModder-FX-jar

- name: Copy sporemodderfx.jar
run: cp SporeModder-FX-jar/sporemodderfx.jar Updater/src/sporemodder/updater/resources/SporeModderFX.jar

- 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: cd Updater && mvn -B package --file pom.xml

- run: ls
- run: ls Updater
- run: ls SporeModder-FX-jar

- name: Update release files
run: |
cp reg_cnv.txt "Updater/SporeModder FX/reg_cnv.txt"
cp reg_file.txt "Updater/SporeModder FX/reg_file.txt"
cp reg_property.txt "Updater/SporeModder FX/reg_property.txt"
cp reg_simulator.txt "Updater/SporeModder FX/reg_simulator.txt"
cp reg_simulator_stub.txt "Updater/SporeModder FX/reg_simulator_stub.txt"
cp reg_type.txt "Updater/SporeModder FX/reg_type.txt"
cp sporemodderfx.jar "Updater/SporeModder FX/SporeModderFX.jar"
- name: Generate release zip
run: zip -r "SporeModder FX.zip" "Updater/SporeModder FX"

- name: "Upload build: Updater"
uses: actions/[email protected]
with:
name: SporeModder-FX-Release
path: Updater/shade/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_smfx
needs: build_updater
runs-on: ubuntu-latest
steps:
- name: Checkout SporeModder-FX
Expand All @@ -52,7 +126,7 @@ jobs:
echo "version=$version" >> $GITHUB_OUTPUT
- name: Download artifacts
uses: actions/download-artifact@v2.1.1
uses: actions/download-artifact@v3
with:
name: SporeModder-FX-jar

Expand Down

0 comments on commit 8d7dd18

Please sign in to comment.