-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
268 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Build | ||
|
||
on: | ||
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g., for dependabot pull requests) | ||
push: | ||
branches: [main] | ||
# Trigger the workflow on any pull request | ||
pull_request: | ||
workflow_call: | ||
inputs: | ||
ref: | ||
description: "A tag reference passed from Publish workflow" | ||
default: ${{ github.sha }} | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Fetch Sources | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
fetch-depth: 0 | ||
filter: tree:0 | ||
|
||
- name: Setup .NET environment | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: "8.0.100" | ||
|
||
- name: Install Evaisa's netcode-patcher | ||
run: | | ||
dotnet tool install -g Evaisa.NetcodePatcher.Cli | ||
- name: Restore project | ||
run: | | ||
dotnet restore | ||
dotnet tool restore | ||
- name: Build and pack solution | ||
run: | | ||
dotnet pack -c Release | ||
- name: Set MOD_NAME environment variable | ||
run: echo "MOD_NAME=$(cat ./*/dist/name.txt )" >> $GITHUB_ENV | ||
|
||
- name: Set MOD_VERSION environment variable | ||
run: echo "MOD_VERSION=$(cat ./*/dist/version.txt )" >> $GITHUB_ENV | ||
|
||
- name: Set ZIP_PATH environment variable | ||
run: echo "ZIP_PATH=./${{ env.MOD_NAME }}/dist/curseforge.zip" >> $GITHUB_ENV | ||
|
||
- name: Upload CurseForge artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: curseforge-build | ||
path: ${{ env.ZIP_PATH }} | ||
|
||
- name: Upload Thunderstore artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: thunderstore-build | ||
path: ./*/dist/*.zip | ||
|
||
- name: Upload nupkg artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nupkg-build | ||
path: ./*/bin/Release/*.nupkg | ||
|
||
- name: Upload Versions artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: versions | ||
path: ./*/dist/*.txt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Publish | ||
|
||
on: | ||
release: | ||
types: [prereleased, released] | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
ref: ${{ github.event.release.tag_name }} | ||
|
||
upload-release-artifacts: | ||
name: Add artifacts to Release | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Fetch Sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download all artifacts | ||
uses: actions/download-artifact@v4 | ||
|
||
- name: Upload artifacts to Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB }} | ||
run: gh release upload ${{ github.event.release.tag_name }} thunderstore-build/*/dist/*.zip nupkg-build/*/bin/Release/*.nupkg | ||
|
||
release-curseforge: | ||
needs: build | ||
uses: ./.github/workflows/release-curseforge.yml | ||
secrets: | ||
curseforge-token: ${{ secrets.CURSEFORGE_API_KEY }} | ||
project-id: ${{ secrets.CURSEFORGE_PROJECTID }} | ||
|
||
release-thunderstore: | ||
needs: build | ||
uses: ./.github/workflows/release-thunderstore.yml | ||
secrets: | ||
thunderstore-token: ${{ secrets.THUNDERSTORE_API_KEY }} | ||
|
||
release-nuget: | ||
needs: build | ||
uses: ./.github/workflows/release-nuget.yml | ||
secrets: | ||
nuget-token: ${{ secrets.NUGET_API_KEY }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Release on Curseforge | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
curseforge-token: | ||
required: true | ||
project-id: | ||
required: true | ||
|
||
jobs: | ||
curseforge: | ||
name: Upload | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Fetch Sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download Curseforge artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: curseforge-build | ||
|
||
- name: Download Versions artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: versions | ||
|
||
- name: Set MOD_NAME environment variable | ||
run: echo "MOD_NAME=$(cat ./*/dist/name.txt )" >> $GITHUB_ENV | ||
|
||
- name: Set MOD_VERSION environment variable | ||
run: echo "MOD_VERSION=$(cat ./*/dist/version.txt )" >> $GITHUB_ENV | ||
|
||
- name: Set ZIP_PATH environment variable | ||
run: echo "ZIP_PATH=./${{ env.MOD_NAME }}/dist/curseforge.zip" >> $GITHUB_ENV | ||
|
||
- name: "Upload to CurseForge" | ||
uses: itsmeow/curseforge-upload@v3 | ||
with: | ||
token: ${{ secrets.curseforge-token }} | ||
project_id: ${{ secrets.project-id }} | ||
game_endpoint: "lethal-company" | ||
game_versions: "0.50.0" | ||
file_path: ${{ env.ZIP_PATH }} | ||
display_name: ${{ env.MOD_NAME }} v${{ env.MOD_VERSION }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Release on Nuget | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
nuget-token: | ||
required: true | ||
|
||
jobs: | ||
nuget: | ||
name: Upload | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Fetch Sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download nupkg artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: nupkg-build | ||
|
||
- name: Setup .NET environment | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: "8.0.100" | ||
|
||
- name: Publish to NuGet.org | ||
run: | | ||
dotnet nuget push ./*/bin/Release/*.nupkg --api-key ${{ secrets.nuget-token }} --source https://api.nuget.org/v3/index.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Release on Thunderstore | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
thunderstore-token: | ||
required: true | ||
|
||
jobs: | ||
thunderstore: | ||
name: Upload | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Fetch Sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download Thunderstore artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: thunderstore-build | ||
|
||
- name: Setup .NET environment | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: "8.0.100" | ||
|
||
- name: Install Evaisa's netcode-patcher | ||
run: | | ||
dotnet tool install -g Evaisa.NetcodePatcher.Cli | ||
- name: Restore dotnet tools | ||
run: | | ||
dotnet tool restore | ||
- name: Publish to Thunderstore | ||
env: | ||
TCLI_AUTH_TOKEN: ${{ secrets.thunderstore-token }} | ||
run: | | ||
dotnet build -target:PublishThunderstore |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "LethalLevelLoader", | ||
"version_number": "1.3.1", | ||
"website_url": "https://github.com/IAmBatby/LethalLevelLoader", | ||
"description": "A Custom API to support the manual and dynamic integration of all forms of custom content in Lethal Company. (v56 Compatible)", | ||
"dependencies": [ | ||
"Evaisa-FixPluginTypesSerialization-1.1.1", | ||
"MaxWasUnavailable-LethalModDataLib-1.2.2", | ||
"BepInEx-BepInExPack-5.4.2100" | ||
] | ||
} |