Skip to content

GCM 2.7.0

GCM 2.7.0 #17

name: release-dotnet-tool
on:
release:
types: [released]
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
default: '2.6.0'
jobs:
release:
runs-on: windows-latest
environment: release
steps:
- name: Download NuGet package from release and publish
run: |
# Get asset information
$github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json
$asset = $github.release.assets | Where-Object -Property name -match '.nupkg$'
# Download asset
Invoke-WebRequest -Uri $asset.browser_download_url -OutFile $asset.name
# Publish asset
dotnet nuget add source https://int.nugettest.org/api/v2/index.json -n int.nugettest.org
dotnet nuget push $asset.name --api-key ${{ secrets.NUGET_API_KEY }} --source int.nugettest.org
shell: powershell