Skip to content

1.0.12

1.0.12 #45

Workflow file for this run

name: Publish
on:
release:
types: [ published ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Set Nadeo API secrets
run: |
dotnet user-secrets -p Tests/ManiaAPI.NadeoAPI.Tests --id d7b44d16-a183-42ef-95f5-cdcb6be7869a set "DedicatedServer:Login" "${{ secrets.NADEO_API_LOGIN }}"
dotnet user-secrets -p Tests/ManiaAPI.NadeoAPI.Tests --id d7b44d16-a183-42ef-95f5-cdcb6be7869a set "DedicatedServer:Password" "${{ secrets.NADEO_API_PASSWORD }}"
- name: Set Trackmania API secrets
run: |
dotnet user-secrets -p Tests/ManiaAPI.TrackmaniaAPI.Tests --id d864cd9f-edad-4ebf-b6e2-9c0c91bd62f8 set "ClientId" "${{ secrets.TRACKMANIA_API_CLIENTID }}"
dotnet user-secrets -p Tests/ManiaAPI.TrackmaniaAPI.Tests --id d864cd9f-edad-4ebf-b6e2-9c0c91bd62f8 set "ClientSecret" "${{ secrets.TRACKMANIA_API_CLIENTSECRET }}"
- name: Build
run: dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-build --verbosity normal
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.0
with:
name: build
path: Src/ManiaAPI.*/bin/Release/*.nupkg
publish:
name: Publish ManiaAPI.${{ matrix.lib }}
needs: build
strategy:
matrix:
lib: [Base, NadeoAPI, TMX, TrackmaniaAPI, TrackmaniaIO]
runs-on: ubuntu-latest
steps:
- name: Download a Build Artifact
uses: actions/download-artifact@v3.0.0
with:
name: build
- name: Publish the ManiaAPI.${{ matrix.lib }} package to nuget.org
run: dotnet nuget push ManiaAPI.${{ matrix.lib }}/bin/Release/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
- name: Publish the ManiaAPI.${{ matrix.lib }} package to github.com
run: dotnet nuget push ManiaAPI.${{ matrix.lib }}/bin/Release/*.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/bigbang1112/index.json --skip-duplicate
- name: Attach the ManiaAPI.${{ matrix.lib }} package to the release
uses: svenstaro/upload-release-action@v2
with:
file: ManiaAPI.${{ matrix.lib }}/bin/Release/*.nupkg
file_glob: true
tag: ${{ github.ref }}
overwrite: true