-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.16 KB
/
create-release.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
43
44
on:
push:
tags:
- '*'
name: Create Release
jobs:
publish:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.0.100
- name: Pack
run: dotnet pack -c Release
- name: Install NuGet
run: choco install nuget.commandline
- name: Add NuGet source
run: nuget sources Add -Name "GPR" -Source "https://nuget.pkg.github.com/mysql-net/index.json" -UserName bgrainger -Password ${{ secrets.GITHUB_TOKEN }}
- name: Publish to GPR
shell: pwsh
run: |
$tag = "${{ github.ref }}".Substring(10)
nuget push src\PlaygroundLibrary\bin\Release\PlaygroundLibrary.$tag.nupkg -Source GPR
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Create Release
uses: actions/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false