This repository has been archived by the owner on Jan 16, 2025. It is now read-only.
forked from lidgren/lidgren-network-gen3
-
Notifications
You must be signed in to change notification settings - Fork 6
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
2 changed files
with
21 additions
and
22 deletions.
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 |
---|---|---|
|
@@ -8,30 +8,30 @@ jobs: | |
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
LIDGREN_VERSION: '2.0.0.${{ github.run_number }}-beta' | ||
ARTIFACT_NAME: 'Lidgren.Network.2.0.0.${{ github.run_number }}-beta' | ||
LIDGREN_VERSION: '2.0.0.${{ github.run_number }}' | ||
ARTIFACT_NAME: 'Lidgren.Network.2.0.0.${{ github.run_number }}' | ||
outputs: | ||
artifact_name: '${{ env.ARTIFACT_NAME }}' | ||
nupkg_base_name: 'AscensionGameDev.Lidgren.Network.${{ env.LIDGREN_VERSION }}' | ||
nupkg_base_name: 'AscensionGameDev.Lidgren.Network.${{ env.LIDGREN_VERSION }}-beta' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.0.x | ||
dotnet-version: 6.* | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
- id: build_debug | ||
name: Build (Debug) | ||
run: dotnet build --no-restore --configuration Debug -p:VersionPrefix=$LIDGREN_VERSION --version-suffix beta-debug | ||
run: dotnet build --no-restore -c Debug -p:VersionPrefix=$LIDGREN_VERSION -p:VersionSuffix=beta-debug | ||
- id: build_release | ||
name: Build (Release) | ||
run: dotnet build --no-restore --configuration Release -p:VersionPrefix=$LIDGREN_VERSION --version-suffix beta | ||
run: dotnet build --no-restore -c Release -p:VersionPrefix=$LIDGREN_VERSION -p:VersionSuffix=beta | ||
- name: Upload build artifacts | ||
uses: actions/[email protected] | ||
with: | ||
name: '${{ env.ARTIFACT_NAME }}' | ||
path: 'Lidgren.Network/bin/*/*.*nupkg' | ||
path: 'Lidgren.Network/bin/*' | ||
if-no-files-found: error | ||
retention-days: 1 | ||
test: | ||
|
@@ -49,7 +49,7 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
name: '${{ needs.build.outputs.artifact_name }}' | ||
- name: Publish Release | ||
- name: Publish Release nupkg | ||
run: dotnet nuget push 'Release/${{ needs.build.outputs.nupkg_base_name }}.nupkg' --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.LIDGREN_NUGET_API_KEY }} | ||
- name: Publish Debug | ||
- name: Publish Debug nupkg | ||
run: dotnet nuget push 'Debug/${{ needs.build.outputs.nupkg_base_name }}-debug.nupkg' --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.LIDGREN_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 |
---|---|---|
|
@@ -3,40 +3,39 @@ name: Lidgren.Network PRs | |
on: pull_request | ||
|
||
jobs: | ||
build_pr: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
LIDGREN_VERSION: '1.8.0.${{ github.run_number }}' | ||
ARTIFACT_NAME: 'Lidgren.Network.1.8.0.${{ github.run_number }}' | ||
LIDGREN_VERSION: '2.0.0.${{ github.run_number }}' | ||
ARTIFACT_NAME: 'Lidgren.Network.2.0.0.${{ github.run_number }}' | ||
outputs: | ||
artifact_name: '${{ env.ARTIFACT_NAME }}' | ||
nupkg_base_name: 'AscensionGameDev.Lidgren.Network.${{ env.LIDGREN_VERSION }}' | ||
nupkg_base_name: 'AscensionGameDev.Lidgren.Network.${{ env.LIDGREN_VERSION }}-beta' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.0.x | ||
dotnet-version: 6.* | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
- id: build_debug | ||
name: Build (Debug) | ||
run: dotnet build --no-restore --configuration Debug -p:VersionPrefix=$LIDGREN_VERSION --version-suffix debug | ||
run: dotnet build --no-restore -c Debug -p:VersionPrefix=$LIDGREN_VERSION -p:VersionSuffix=beta-debug | ||
- id: build_release | ||
name: Build (Release) | ||
run: dotnet build --no-restore --configuration Release -p:VersionPrefix=$LIDGREN_VERSION | ||
- name: Upload build artifacts for debugging if build failed | ||
run: dotnet build --no-restore -c Release -p:VersionPrefix=$LIDGREN_VERSION -p:VersionSuffix=beta | ||
- name: Upload build artifacts | ||
uses: actions/[email protected] | ||
if: ${{ failure() }} | ||
with: | ||
name: '${{ env.ARTIFACT_NAME }}' | ||
path: Lidgren.Network/bin/* | ||
path: 'Lidgren.Network/bin/*' | ||
if-no-files-found: error | ||
retention-days: 1 | ||
test_pr: | ||
test: | ||
runs-on: ubuntu-latest | ||
needs: build_pr | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Tests (Pull Requests) | ||
- name: Tests (main) | ||
run: dotnet test --verbosity normal |