-
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (54 loc) · 1.85 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
46
47
48
49
50
51
52
53
54
55
56
57
name: "Release DisCatSharp Extensions"
on:
workflow_dispatch:
inputs:
version_suffix:
description: "Version Suffix"
required: false
type: string
release_as_prerelease:
description: "Release as pre-release"
required: true
type: boolean
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: true
jobs:
release:
timeout-minutes: 30
runs-on: windows-latest
name: Build library and release
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: |
8.0.100
7.0.404
6.x
- name: Restore dependencies
run: dotnet restore
- name: Build library as full release
if: ${{!inputs.release_as_prerelease}}
shell: pwsh
run: ./rebuild-lib.ps1 -ArtifactLocation ./dcs-artifacts -Configuration Release
- name: Build library as pre-release
if: ${{inputs.release_as_prerelease}}
shell: pwsh
run: ./rebuild-lib.ps1 -ArtifactLocation ./dcs-artifacts -Configuration Release -VersionSuffix ${{github.event.inputs.version_suffix}}
- name: Remove invalid packages
shell: pwsh
run: rm *.symbols.*
working-directory: ./dcs-artifacts
- name: Publish to NuGet
shell: pwsh
run: dotnet nuget push --source https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} * --skip-duplicate
working-directory: ./dcs-artifacts
- name: Publish to GitHub Packages
shell: pwsh
run: dotnet nuget push --source https://nuget.pkg.github.com/Aiko-IT-Systems/index.json -k ${{secrets.GITHUB_TOKEN}} *
working-directory: ./dcs-artifacts