-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1.16 KB
/
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
45
---
name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
release:
runs-on: windows-2022
timeout-minutes: 5
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build Program
run: dotnet build --no-restore -c Release
- name: Create Nuget Package
run: dotnet pack src/InputMimicry/InputMimicry.csproj -c Release --output nupkgs
- name: Create Release Draft
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
- name: Push nuget package to Github Pacakges
run: |
dotnet nuget add source "https://nuget.pkg.github.com/kawana77b/index.json" -n "github" -u kawana77b -p ${{secrets.GH_PACKAGES_PAT}} --store-password-in-clear-text
cd nupkgs && dotnet nuget push "*.nupkg" --api-key ${{secrets.GH_PACKAGES_PAT}} --source "github" --skip-duplicate