forked from dotnet/Docker.DotNet
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.15 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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: 9.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
})