refactor: Update nuget-cd-prerelease.yml to use version 4.x for alpha… #4
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: CI pipeline | |
# This workflow is triggered on pushes to the repository. | |
on: | |
push: | |
tags: | |
- 4.[0-9]+.[0-9]+-alpha.[0-9]+ | |
jobs: | |
build: | |
name: Deploy NuGet package | |
runs-on: windows-latest | |
env: | |
FS_API_KEY: "${{ secrets.FS_CI_CAMPAIGNS_API_KEY }}" | |
FS_ENV_ID: "${{ secrets.FS_CI_CAMPAIGNS_ENV_ID }}" | |
ASSEMBLY_SIGNING_KEY: "${{ secrets.ASSEMBLY_SIGNING_KEY }}" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "8.0.x" | |
- name: Setup NuGet | |
uses: NuGet/setup-nuget@v2 | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true" | |
- name: Restore NuGet Packages | |
run: dotnet restore Flagship.sln | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
- name: Run tests | |
shell: pwsh | |
run: ./test-run-ci.bat | |
working-directory: Flagship.Tests | |
- name: Create signing Key file | |
shell: pwsh | |
run: $Env:ASSEMBLY_SIGNING_KEY | Out-File -FilePath flagshipSigningKey.txt | |
working-directory: Flagship | |
- name: Decode signing Key | |
shell: pwsh | |
run: certutil -decode .\flagshipSigningKey.txt .\flagshipSigningKey.snk | |
working-directory: Flagship | |
- name: Build nuget | |
run: MSBuild.exe -t:pack -property:Configuration=Release -property:SignAssembly=True -property:AssemblyOriginatorKeyFile=flagshipSigningKey.snk | |
working-directory: Flagship | |
- name: set Nuget api key | |
run: nuget setApiKey ${{ secrets.NUGET_APIKEY }} | |
- name: Push Nuget Packages | |
run: nuget push Flagship.SDK.*.nupkg -Source https://api.nuget.org/v3/index.json | |
working-directory: Flagship/NugetPackageRelease |