v1.3.38 #32
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: Package and Release | |
on: | |
release: | |
types: [published] | |
tags: | |
- 'v*.*.*' | |
jobs: | |
package: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install 7-Zip | |
run: sudo apt-get install p7zip-full | |
- name: Extract Version from Tag | |
run: echo "VERSION=$(echo ${GITHUB_REF} | sed 's/refs\/tags\/v//')" >> $GITHUB_ENV | |
- name: Copy CHANGELOG.md to Build directory | |
run: | | |
mkdir -p Build BuildPreview | |
cp CHANGELOG.md Build/ | |
cp CHANGELOG.md BuildPreview/ | |
- name: Get Text from last.txt | |
run: | | |
LAST_EXPANSION_VERSION=$(curl -s https://raw.githubusercontent.com/HolographicWings/LethalExpansion/main/last.txt) | |
echo "LAST_EXPANSION_VERSION=$LAST_EXPANSION_VERSION" >> $GITHUB_ENV | |
- name: Zip files | |
if: github.event.release.prerelease == false | |
run: 7z a -tzip -mx=9 ./Build/LethalSDK_Project.zip ./LethalSDK_Project | |
- name: Zip files | |
if: github.event.release.prerelease == false | |
run: 7z a -tzip -mx=9 ./Releases/LethalSDK_v${{ env.VERSION }}.zip ./Build/* | |
- name: Zip files | |
if: github.event.release.prerelease == true | |
run: 7z a -tzip -mx=9 ./BuildPreview/LethalSDK_Project.zip ./LethalSDK_Project | |
- name: Zip files | |
if: github.event.release.prerelease == true | |
run: 7z a -tzip -mx=9 ./Releases/LethalSDK_v${{ env.VERSION }}_pre.zip ./BuildPreview/* | |
- name: Upload Release Asset Zip | |
if: github.event.release.prerelease == false | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.LETHAL_SDK_SECRET }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./Releases/LethalSDK_v${{ env.VERSION }}.zip | |
asset_name: LethalSDK_v${{ env.VERSION }}.zip | |
asset_content_type: application/zip | |
- name: Upload Release Asset Zip | |
if: github.event.release.prerelease == true | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.LETHAL_SDK_SECRET }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./Releases/LethalSDK_v${{ env.VERSION }}_pre.zip | |
asset_name: LethalSDK_v${{ env.VERSION }}.zip | |
asset_content_type: application/zip | |
- name: 7z files | |
if: github.event.release.prerelease == false | |
run: 7z a -t7z -mx=9 ./Build/LethalSDK_Project.7z ./LethalSDK_Project | |
- name: 7z files | |
if: github.event.release.prerelease == false | |
run: 7z a -t7z -mx=9 ./Releases/LethalSDK_v${{ env.VERSION }}.7z ./Build/* -x!LethalSDK_Project.zip | |
- name: 7z files | |
if: github.event.release.prerelease == true | |
run: 7z a -t7z -mx=9 ./BuildPreview/LethalSDK_Project.7z ./LethalSDK_Project | |
- name: 7z files | |
if: github.event.release.prerelease == true | |
run: 7z a -t7z -mx=9 ./Releases/LethalSDK_v${{ env.VERSION }}_pre.7z ./BuildPreview/* -x!LethalSDK_Project.zip | |
- name: Upload Release Asset 7z | |
if: github.event.release.prerelease == false | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.LETHAL_SDK_SECRET }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./Releases/LethalSDK_v${{ env.VERSION }}.7z | |
asset_name: LethalSDK_v${{ env.VERSION }}.7z | |
asset_content_type: application/x-7z-compressed | |
- name: Upload Release Asset 7z | |
if: github.event.release.prerelease == true | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.LETHAL_SDK_SECRET }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./Releases/LethalSDK_v${{ env.VERSION }}_pre.7z | |
asset_name: LethalSDK_v${{ env.VERSION }}.7z | |
asset_content_type: application/x-7z-compressed | |
- name: Upload Release Asset Zip | |
if: github.event.release.prerelease == false | |
uses: GreenTF/upload-thunderstore-package@v4.3 | |
with: | |
namespace: HolographicWings | |
description: Lethal Company Development Kit to easily add new Scraps, Moons and more in future. | |
token: ${{ secrets.THUNDERSTORE_TOKEN }} | |
name: LethalSDK | |
version: ${{ env.VERSION }} | |
community: lethal-company | |
repo: thunderstore.io | |
categories: | | |
bepinex | |
items | |
moons | |
mods | |
audio | |
misc | |
tools | |
deps: | | |
BepInEx-BepInExPack@5.4.2100 | |
HolographicWings-LethalExpansion@${{ env.VERSION }} | |
website: https://github.com/HolographicWings/LethalSDK-Unity-Project | |
file: ./Releases/LethalSDK_v${{ env.VERSION }}.zip | |
- name: Upload Release Asset Zip | |
if: github.event.release.prerelease == true | |
uses: GreenTF/upload-thunderstore-package@v4.3 | |
with: | |
namespace: HolographicWings | |
description: Preview version of LethalSDK. | |
token: ${{ secrets.THUNDERSTORE_TOKEN }} | |
name: LethalSDK_Preview | |
version: ${{ env.VERSION }} | |
community: lethal-company | |
repo: thunderstore.io | |
categories: | | |
bepinex | |
items | |
moons | |
mods | |
audio | |
misc | |
tools | |
deps: | | |
BepInEx-BepInExPack@5.4.2100 | |
HolographicWings-LethalExpansion@${{ env.VERSION }} | |
website: https://github.com/HolographicWings/LethalSDK-Unity-Project | |
file: ./Releases/LethalSDK_v${{ env.VERSION }}_pre.zip |