Update to work on Apple Silicon #84
Workflow file for this run
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: .NET Core | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
source-url: https://nuget.pkg.github.com/<owner>/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
run: dotnet test --no-restore --verbosity normal | |
- name: Pack nuget | |
run: dotnet pack -c Release | |
- name: Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: NuGets | |
path: | | |
adiff\nupkg\*.nupkg | |
apkdiff\nupkg\*.nupkg | |
- name: Setup NuGet | |
uses: nuget/setup-nuget@v1 | |
- name: Publish to nuget | |
run: | | |
dotnet nuget push adiff\nupkg\*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --no-symbols --skip-duplicate --source "https://api.nuget.org/v3/index.json" | |
dotnet nuget push apkdiff\nupkg\*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --no-symbols --skip-duplicate --source "https://api.nuget.org/v3/index.json" | |
- name: Publish to github | |
run: | | |
nuget sources Add -Name "GPR" -Source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" -UserName ${{ github.repository_owner }} -Password ${{ secrets.GITHUB_TOKEN }} | |
nuget setApiKey ${{ secrets.NUGET_API_KEY }} -Source "GPR" | |
nuget push adiff\nupkg\*.nupkg -Source "GPR" -SkipDuplicate | |
nuget push apkdiff\nupkg\*.nupkg -Source "GPR" -SkipDuplicate | |