Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

Commit

Permalink
fix: fix actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lodicolo committed Apr 3, 2022
1 parent 285a9be commit 322e931
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
25 changes: 12 additions & 13 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 322e931

Please sign in to comment.