-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (39 loc) · 1.59 KB
/
commit.yml
File metadata and controls
48 lines (39 loc) · 1.59 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
48
name: Build main
on:
push:
branches:
- main
paths:
- "src/Starnight/**"
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(toJSON(github.events.commits.*.message), '[ci skip]')"
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
- name: Restore
run: "dotnet restore src/Starnight"
- name: pack packages
run: "mkdir build && dotnet pack src/Starnight --no-dependencies -p:SymbolPackageFormat=snupkg -p:IncludeSymbols=true -p:IncludeSource=true -o build -p:VersionSuffix='dev.${{ github.run_number }}' -p:BuildNumber=${{ github.run_number }}"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3
with:
name: Starnight
path: ./build/
- name: Discord Webhook
uses: tsickert/discord-webhook@v4.0.0
with:
webhook-url: ${{ secrets.BUILD_WEBHOOK }}
embed-title: New Starnight build available!
embed-description: |
Commit author: [${{ github.actor }}](https://github.com/${{ github.actor }})
Commit hash: [`${{ github.sha }}`](https://github.com/${{github.repository}}/commit/${{github.sha}})
GitHub Actions run: [`${{ github.run_id }}`](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
GitHub Actions run number: `${{ github.run_number }}`
embed-color: 15073511
- name: Publish package
run: "dotnet nuget push ./build/* --api-key ${{ secrets.NUGET_API_KEY }} --source nuget.org --no-service-endpoint --skip-duplicate"