-
Notifications
You must be signed in to change notification settings - Fork 9
44 lines (35 loc) · 1.31 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
name: Build & Create Release (main)
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-beta'
workflow_dispatch:
jobs:
build:
name: Build & Test
uses: ./.github/workflows/_build.yml
deploy:
name: Create Draft Release with NuGet Packages & Documentation Site
needs:
- build
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Avoid pre-populating the NuGet package cache
steps:
- name: 'Checkout Code'
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
- run: Compress-Archive -Path "Documentation Site/*" -DestinationPath DocumentationSite.zip
shell: pwsh
- name: Create Draft Release
shell: pwsh
# Can't just use wildcard in this command due to https://github.com/cli/cli/issues/5099 so use Get-Item
run: |
gh release create --repo "AdrianJSClark/aydsko-iracingdata" --draft --title "${{ github.ref_name }}" --notes-file "Release Notes/Package Release Notes.txt" "release-${{ github.ref_name }}" (Get-Item "NuGet Packages/*.nupkg","DocumentationSite.zip")
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}