-
Notifications
You must be signed in to change notification settings - Fork 31
47 lines (44 loc) · 1.17 KB
/
Copy pathrelease.yml
File metadata and controls
47 lines (44 loc) · 1.17 KB
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
46
47
name: Release
on:
push:
branches: [ master ]
jobs:
build:
uses: ./.github/workflows/build.yml
publish:
runs-on: ubuntu-latest
needs: [ build ]
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup .NET 6
uses: actions/setup-dotnet@v5
with:
dotnet-version: 6.0.x
- name: Setup .NET 8
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
- name: NuGet Login
uses: NuGet/login@v1
id: login
with:
user: koenvzeijl
- name: Publish NuGet
id: publish_nuget
uses: alirezanet/publish-nuget@v3.1.0
with:
PROJECT_FILE_PATH: AspNetCore.SassCompiler/AspNetCore.SassCompiler.csproj
PACKAGE_NAME: AspNetCore.SassCompiler
env:
NUGET_KEY: ${{ steps.login.outputs.NUGET_API_KEY }}
- name: Create release
id: create_release
if: success() && steps.publish_nuget.outputs.version != ''
run: gh release create ${{ steps.publish_nuget.outputs.version }} --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}