AC patch update #9281
Workflow file for this run
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: Build-PR | |
on: | |
workflow_dispatch: | |
inputs: | |
PR: | |
description: PR Number | |
required: true | |
pull_request_target: | |
branches: [ master, Development, Rimworld-Version-1.4 ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Prebuild | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
git pull --no-ff --no-commit --allow-unrelated-histories -X theirs origin pull/${{ github.event.pull_request.number }}${{ github.event.inputs.PR }}/head: | |
git status | |
rm -rf *.py *.so ./*/*.py ./*/*.so | |
wget https://raw.githubusercontent.com/CombatExtended-Continued/CombatExtended/Development/Make.py -O Make.py | |
wget https://raw.githubusercontent.com/CombatExtended-Continued/CombatExtended/Development/BuildCompat.py -O BuildCompat.py | |
mkdir -p Assemblies | |
mkdir -p ${{ runner.temp }}/downloads | |
rm -rf AssemblyPublicizer csc.zip csc | |
git clone https://github.com/CombatExtended-Continued/AssemblyPublicizer | |
wget https://github.com/CombatExtended-Continued/roslyn/releases/download/CSC-13/csc.zip | |
unzip csc.zip | |
- name: remove loader | |
run: | | |
rm Assemblies/CombatExtendedLoader.dll | |
- name: build core | |
run: | | |
TEMP=${{ runner.temp }}/ python Make.py --csproj Source/CombatExtended/CombatExtended.csproj --output Assemblies/CombatExtended.dll --download-libs --all-libs --publicizer $PWD/AssemblyPublicizer --csc $PWD/csc | |
- name: build compat | |
run: | | |
TEMP=${{ runner.temp }}/ python BuildCompat.py --csc $PWD/csc | |
- name: package | |
run: | | |
mkdir CombatExtended | |
cp -r Source/ Assemblies/ About/ Defs/ Languages/ Patches/ Royalty/ Ideology/ Biotech/ Anomaly/ Sounds/ Textures/ ModPatches/ LoadFolders.xml README.md SupportedThirdPartyMods.md CombatExtended | |
zip -9 -r build.zip CombatExtended | |
- name: Upload to DO | |
run: | | |
/usr/bin/printf "%s" "$SSH_KEY" > id_ecdsa | |
/bin/echo "$SSH_KEY_PUB" > id_ecdsa.pub | |
/bin/chmod 600 id_ecdsa | |
/bin/echo put build.zip CombatExtended-${{ github.run_id }}.zip | /usr/bin/sftp -oStrictHostKeyChecking=no -P 2022 -i ./id_ecdsa [email protected] | |
shell: bash | |
env: | |
SSH_KEY: ${{secrets.ID_ECDSA}} | |
SSH_KEY_PUB: ${{secrets.ID_ECDSA_PUB}} | |
- name: Create comment | |
uses: peter-evans/create-or-update-comment@v2 | |
with: | |
issue-number: ${{ github.event.pull_request.number }}${{ github.event.inputs.PR }} | |
body: | | |
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-${{ github.run_id }}.zip | |
- name: Add Label | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
github_token: ${{ secrets.github_token }} | |
labels: "Download in Comments" | |
number: ${{ github.event.pull_request.number }}${{ github.event.inputs.PR }} | |