-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (46 loc) · 1.47 KB
/
release.yml
File metadata and controls
46 lines (46 loc) · 1.47 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
# This file is auto-generated by Generaptor.
name: Release
on:
push:
tags:
- v*
schedule:
- cron: 0 0 * * 6
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-24.04
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
NUGET_PACKAGES: ${{ github.workspace }}/.github/nuget-packages
steps:
- name: Checkout
uses: actions/checkout@v6
- id: version
name: Read version from ref
shell: pwsh
run: echo "version=$(./Scripts/Get-Version.ps1 -RefName $env:GITHUB_REF)" >> $env:GITHUB_OUTPUT
- name: Set up .NET SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: NuGet cache
uses: actions/cache@v5
with:
key: ${{ runner.os }}.nuget.${{ hashFiles('**/*.fsproj') }}
path: ${{ env.NUGET_PACKAGES }}
- name: Build Release
run: dotnet build -c Release
- name: Pack NuGet package
run: dotnet pack NRayUI -c Release -p:Version=${{ steps.version.outputs.version }} --output nupkg
- name: Publish to NuGet
run: dotnet nuget push nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
body: Automatic release for NRayUI v${{ steps.version.outputs.version }}
files: nupkg/*.nupkg
name: NRayUI v${{ steps.version.outputs.version }}
tag_name: ${{ github.ref_name }}