-
-
Notifications
You must be signed in to change notification settings - Fork 40
72 lines (69 loc) · 3.37 KB
/
internal-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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: "Internal Release"
on:
workflow_dispatch:
merge_group:
push:
branches-ignore:
- main
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: true
jobs:
release:
timeout-minutes: 15
runs-on: ubuntu-latest
name: Build library and release internally
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: |
9.x
8.x
- name: Restore dependencies
run: |
dotnet restore --no-cache -f -v minimal DisCatSharp.sln
dotnet restore --no-cache -f -v minimal DisCatSharp.Tools/DisCatSharp.Tools.sln
- name: Set outputs
id: vars
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Build library as pre-release
shell: pwsh
run: ./DisCatSharp.Tools/rebuild-lib.ps1 -ArtifactLocation ./dcs-artifacts -Configuration Release -VersionSuffix ${{ steps.vars.outputs.sha }}
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
# - name: Build tools as pre-release
# shell: pwsh
# run: ./DisCatSharp.Tools/rebuild-tools.ps1 -ArtifactLocation ./dcs-tools-artifacts -Configuration Release -VersionSuffix ${{ steps.vars.outputs.sha }}
- name: Build attributes as pre-release
shell: pwsh
run: ./DisCatSharp.Tools/rebuild-attributes.ps1 -ArtifactLocation ./dcs-attributes-artifacts -Configuration Release -VersionSuffix ${{ steps.vars.outputs.sha }}
- name: Remove invalid packages
run: rm *.symbols.*
working-directory: ./dcs-artifacts
- name: Remove symbol packages
run: rm *.snupkg
working-directory: ./dcs-artifacts
# - name: Remove symbol packages for tools
# run: rm *.snupkg
# working-directory: ./dcs-tools-artifacts
- name: Remove symbol packages for attributes
run: rm *.snupkg
working-directory: ./dcs-attributes-artifacts
- name: Add AITSYS Internal NuGet source
run: dotnet nuget add source --name aitsys https://registry.aitsys-infra.tools/nuget/aitsys/index.json --username bytesafe --password ${{ secrets.BYTESAFE }} --store-password-in-clear-text
- name: Publish to library to AITSYS Internal Registry
run: dotnet nuget push --source aitsys -k ${{ secrets.BYTESAFE }} *
working-directory: ./dcs-artifacts
# - name: Publish to tools to AITSYS Internal Registry
# run: dotnet nuget push --source aitsys -k ${{ secrets.BYTESAFE }} *
# working-directory: ./dcs-tools-artifacts
- name: Publish attributes to AITSYS Internal Registry
run: dotnet nuget push --source aitsys -k ${{ secrets.BYTESAFE }} *
working-directory: ./dcs-attributes-artifacts