Publish #2
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: Publish | |
on: | |
release: | |
types: | |
- released | |
workflow_dispatch: | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Sources | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.release.tag_name }} | |
fetch-depth: 0 | |
filter: tree:0 | |
- name: Setup .NET Env | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: "8.0.100" | |
- name: Restore Solution | |
run: | | |
dotnet restore | |
- name: Pack Solution | |
run: | | |
dotnet pack --configuration Release | |
- name: Upload Compiler Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: compiler-build | |
path: /home/runner/work/LethalNetworkAPI/LethalNetworkAPI/LethalNetworkAPI/bin/Release/netstandard2.1/LethalNetworkAPI.dll | |
- name: Upload NuPkg Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: nupkg-build | |
path: LethalNetworkAPI/bin/Release/*.nupkg | |
upload-release-artifacts: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download all Artifacts | |
uses: actions/download-artifact@v4 | |
- name: Upload artifacts to Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release upload ${{ github.event.release.tag_name }} compiler-build/*/bin/*.dll nupkg-build/*/bin/*.nupkg | |
# deploy-nuget: | |
# needs: build | |
# runs-on: ubuntu-latest | |
deply-thunderstore: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: compiler-build | |
path: ./dist | |
- uses: GreenTF/[email protected] | |
with: | |
namespace: xilophor | |
description: A library/API to allow developers to easily add networking to their mods. | |
token: ${{ secrets.THUNDERSTORE_TOKEN }} | |
name: LethalNetworkAPI | |
version: ${{ github.ref_name }} | |
community: lethal-company | |
categories: | | |
bepinex | |
libraries | |
serverside | |
clientside | |
deps: | | |
[email protected] | |
path: | |
./dist |