Skip to content

Publish v0.0.32 by @s-vitaliy #34

Publish v0.0.32 by @s-vitaliy

Publish v0.0.32 by @s-vitaliy #34

Workflow file for this run

name: Publish to Nuget.org package feed
run-name: Publish ${{github.ref_name}} by @${{ github.actor }}
on: workflow_dispatch
jobs:
release_to_nuget:
name: Release distribution to Nuget (public feed)
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: 6.0.x
- name: Set Package Version
run: |
set -e
version=$(git describe --tags --abbrev=7 | tr -d "v")
sed -i "s/<Version>0.0.0/<Version>$version/" src/Arcane.Framework.csproj
- name: Import Secrets
uses: hashicorp/[email protected]
with:
url: https://hashicorp-vault.production.sneaksanddata.com/
role: github
method: jwt
secrets: |
/secret/data/common/code_signing_certificates certificate_p12 | CERT ;
/secret/data/common/nuget/oss/arcane api_key | API_KEY ;
- name: Build NuGet for Arcane.Framework
working-directory: ./src
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
set -euxo pipefail
version=$(git describe --tags --abbrev=7 | tr -d "v")
dotnet pack --configuration Release Arcane.Framework.csproj
echo "$CERT" | base64 --decode > cert.p12
dotnet nuget sign "bin/Release/Arcane.Framework.$version.nupkg" \
--certificate-path cert.p12 \
--timestamper http://timestamp.digicert.com
dotnet nuget push "bin/Release/Arcane.Framework.$version.nupkg" --api-key "$API_KEY" \
--source https://api.nuget.org/v3/index.json
rm cert.p12