Skip to content

Publish

Publish #1

Workflow file for this run

name: Publish
env:
sln-path: "./src/atin.sln"
package-dir: "packages"
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: 'Tag'
required: true
jobs:
publish:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Publish
run: dotnet publish "${{ env.sln-path }}" -c Release
- name: Pack
run: dotnet pack "${{ env.sln-path }}" -c Release -o "${{ env.package-dir }}" --no-build
- name: Publish to Nuget.org
run: dotnet nuget push "${{ env.package-dir }}"/**/*.nupkg --api-key ${{ secrets.NUGET_AUTH_TOKEN }} --source https://api.nuget.org/v3/index.json