Skip to content

Commit

Permalink
dotnet.yml: Do dotnet pack and upload-artifact.
Browse files Browse the repository at this point in the history
Based on https://github.com/ektrah/nsec/blob/master/.github/workflows/test.yml. This allows the creation of a package without having iOS, TvOS, and Mac Catalyst set up on my machine.
  • Loading branch information
samuel-lucas6 authored Aug 17, 2024
1 parent 2141f14 commit 16f27aa
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test
name: Build, test, and pack

on: [push, pull_request]

Expand All @@ -21,6 +21,8 @@ jobs:
dotnet-version: |
6.0.x
8.0.x
- name: Install workloads
run: dotnet workload install ios tvos maccatalyst
- run: dotnet --info
- name: Test (.NET 8.0/Debug)
run: dotnet test -f net8.0 -c Debug
Expand All @@ -30,8 +32,15 @@ jobs:
run: dotnet test -f net6.0 -c Debug
- name: Test (.NET 6.0/Release)
run: dotnet test -f net6.0 -c Release
- name: Pack
run: dotnet pack -c Release
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: '**/*.nupkg'

test-linux-x64:
needs: test-windows-x64
runs-on: ubuntu-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
Expand All @@ -55,6 +64,7 @@ jobs:
run: dotnet test -f net6.0 -c Release

test-macos-x64:
needs: test-linux-x64
runs-on: macos-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
Expand All @@ -78,6 +88,7 @@ jobs:
run: dotnet test -f net6.0 -c Release

test-linux-musl-x64:
needs: test-macos-x64
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/dotnet/sdk:8.0-alpine
Expand Down

0 comments on commit 16f27aa

Please sign in to comment.