Test Flight v2.6.2.0 #23
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: tagged-release | |
# Controls when the action will run. | |
on: | |
release: | |
types: [published] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
tagged-release: | |
name: "Tagged Release" | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 100 | |
- name: Download required assemblies | |
id: download-assemblies | |
shell: bash | |
env: | |
KSP_ZIP_PASSWORD: ${{ secrets.KSP_ZIP_PASSWORD }} | |
run: | | |
curl https://ksp-ro.s3-us-west-2.amazonaws.com/KSPAssemblies-1.12.zip --output /tmp/bins.zip | |
KSP_DLL_PATH="/opt/ksp/assembly" | |
echo "::set-output name=ksp-dll-path::${KSP_DLL_PATH}" | |
mkdir -p "${KSP_DLL_PATH}" | |
unzip -P "${KSP_ZIP_PASSWORD}" '/tmp/bins.zip' -d "${KSP_DLL_PATH}" | |
rm '/tmp/bins.zip' | |
- name: Build mod solution | |
run: | | |
rm -f ${GITHUB_WORKSPACE}/GameData/TestFlight/Plugins/*.dll | |
mkdir -p "${GITHUB_WORKSPACE}/GameData/TestFlight/Plugins/" | |
msbuild /p:Configuration=Release /p:ReferencePath="${{ steps.download-assemblies.outputs.ksp-dll-path }}" TestFlight.sln | |
cp -v ${GITHUB_WORKSPACE}/bin/Release/TestFlight.dll ${GITHUB_WORKSPACE}/GameData/TestFlight/Plugins/TestFlight.dll | |
cp -v ${GITHUB_WORKSPACE}/TestFlightAPI/TestFlightAPI/bin/Release/TestFlightAPI.dll ${GITHUB_WORKSPACE}/GameData/TestFlight/Plugins/TestFlightAPI.dll | |
cp -v ${GITHUB_WORKSPACE}/TestFlightCore/TestFlightCore/bin/Release/TestFlightCore.dll ${GITHUB_WORKSPACE}/GameData/TestFlight/Plugins/TestFlightCore.dll | |
cp -v ${GITHUB_WORKSPACE}/TestFlightContracts/bin/Release/TestFlightContracts.dll ${GITHUB_WORKSPACE}/GameData/TestFlight/Plugins/TestFlightContracts.dll | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
- name: Make metadata | |
run: | | |
python ${GITHUB_WORKSPACE}/makeMeta.py ${{ github.event.release.tag_name }} | |
- name: Assemble release | |
id: assemble-release | |
run: | | |
RELEASE_DIR="${RUNNER_TEMP}/release" | |
echo "Release dir: ${RELEASE_DIR}" | |
echo "Release zip: ${RELEASE_DIR}/TestFlight-${{ github.event.release.tag_name }}.zip" | |
mkdir -v "${RELEASE_DIR}" | |
echo "::set-output name=release-dir::${RELEASE_DIR}" | |
cp -v -R "${GITHUB_WORKSPACE}/GameData" "${RELEASE_DIR}" | |
cp -v -R "${GITHUB_WORKSPACE}/TestFlight.version" "${RELEASE_DIR}/GameData/TestFlight/TestFlight.version" | |
cd ${RELEASE_DIR} | |
zip TestFlight-${{ github.event.release.tag_name }}.zip GameData GameData/TestFlight/* GameData/TestFlight/Plugins/TestFlight*.dll GameData/TestFlight/Resources/* GameData/TestFlight/Resources/Textures/* | |
ls -lrt -d -1 "${RELEASE_DIR}"/{*,.*} | |
- name: Upload package to release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ${{ steps.assemble-release.outputs.release-dir }}/TestFlight-${{ github.event.release.tag_name }}.zip | |
asset_name: TestFlight-${{ github.event.release.tag_name }}.zip | |
asset_content_type: application/zip |