Skip to content

Update Constants.cs #18

Update Constants.cs

Update Constants.cs #18

Workflow file for this run

name: Publish package
# This workflow is triggered on pushes to the repository.
on:
push:
tags:
- 3.[0-9]+.[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@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"
- name: Setup NuGet
uses: NuGet/setup-nuget@v1
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
- name: Restore NuGet Packages
run: nuget restore Flagship.sln
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Build dll
run: MSBuild Flagship.Tests/Flagship.Tests.csproj -property:Configuration=Debug
- name: Run tests
shell: pwsh
run: ./coverage-ci.bat
- 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