chore: Update CI build (#1) #1
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: Publish | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.x | |
- name: Install NBGV tool | |
run: dotnet tool install --tool-path . nbgv | |
- name: Set Version | |
run: ./nbgv cloud | |
- name: Create Packages | |
run: dotnet pack -c Release -o packages -p:ContinuousIntegrationBuild=true | |
- name: Push packages to NuGet.org | |
run: dotnet nuget push ./packages/Docker.DotNet.*.nupkg --skip-duplicate -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json | |
- name: Create Release | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
github.rest.repos.createRelease({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
tag_name: context.ref, | |
name: context.ref, | |
draft: false, | |
prerelease: false, | |
generate_release_notes: true | |
}) |