FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
DSharpPlus/.github/workflows/build-commit.yml at master · DSharpPlus/DSharpPlus · GitHub
DSharpPlus
/
DSharpPlus
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
321
Star
1.3k
Code
Issues
77
Pull requests
3
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
DSharpPlus
/
.github
/
workflows
/
build-commit.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
119 lines (116 loc) · 4.62 KB
Breadcrumbs
DSharpPlus
/
.github
/
workflows
/
build-commit.yml
Copy path
File metadata and controls
119 lines (116 loc) · 4.62 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name
:
Build Commit
on
:
push
:
branches
:
[master]
paths
:
-
"
.github/workflows/build-commit.yml
"
-
"
DSharpPlus*/**
"
-
"
tools/**
"
-
"
docs/**
"
-
"
*.sln
"
-
"
obsolete/DSharpPlus*/**
"
workflow_dispatch
:
env
:
DOTNET_NOLOGO
:
1
DOTNET_CLI_TELEMETRY_OPTOUT
:
1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE
:
1
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT
:
1
jobs
:
package-commit
:
name
:
Package Commit
runs-on
:
ubuntu-latest
if
:
"
!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[ci-skip]')
"
permissions
:
id-token
:
write
#
needed for trusted publishing
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v4
with
:
submodules
:
recursive
fetch-depth
:
0
-
name
:
Setup .NET
uses
:
actions/setup-dotnet@v4
with
:
dotnet-version
:
10
-
name
:
Build Project
run
:
dotnet build
-
name
:
Test Changes
run
:
dotnet test --blame-crash --blame-hang --blame-hang-timeout "30s"
-
name
:
Get Nightly Version
id
:
nightly
run
:
printf "version=%0*d" 5 $(( 1195 + 691 + ${{ github.run_number }} )) >> "$GITHUB_OUTPUT"
-
name
:
Login to NuGet
uses
:
NuGet/login@v1
id
:
nuget-login
with
:
user
:
${{ secrets.NUGET_USER }}
-
name
:
Package Project
run
:
|
# We add 1195 since it's the last build number AppVeyor used.
# We add 686 since it's the last build number GitHub Actions used before the workflow was renamed.
dotnet pack -c Release -o build -p:Nightly=${{ steps.nightly.outputs.version }}
dotnet nuget push "build/*" --skip-duplicate -k ${{ steps.nuget-login.outputs.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
env
:
DISCORD_TOKEN
:
${{ secrets.DISCORD_TOKEN }}
DISCORD_GUILD_ID
:
${{ secrets.DISCORD_GUILD_ID }}
DISCORD_CHANNEL_ID
:
${{ secrets.DISCORD_CHANNEL_ID }}
DISCORD_CHANNEL_TOPIC
:
${{ secrets.DISCORD_CHANNEL_TOPIC }}
DISCORD_DOC_BOT_USER_ID
:
${{ secrets.DISCORD_DOC_BOT_USER_ID }}
DISCORD_BOT_USAGE_CHANNEL_ID
:
${{ secrets.DISCORD_BOT_USAGE_CHANNEL_ID }}
NUGET_URL
:
${{ secrets.NUGET_URL }}
GITHUB_URL
:
${{ github.server_url }}/${{ github.repository }}
-
name
:
Upload Artifact
uses
:
actions/upload-artifact@v4
with
:
name
:
DSharpPlus-Nightly-${{ steps.nightly.outputs.version }}.zip
path
:
./build/*
-
name
:
Get commit message header
id
:
get_commit_message
run
:
|
commit_message_header=$(git log -1 --pretty=%B | head -n 1)
echo "message_header=${commit_message_header}" >> $GITHUB_OUTPUT
-
name
:
Discord Webhook
uses
:
tsickert/discord-webhook@v4.0.0
with
:
webhook-url
:
${{ secrets.BUILD_WEBHOOK }}
embed-title
:
DSharpPlus 5.0.0-nightly-${{ steps.nightly.outputs.version }}
embed-description
:
|
NuGet Link: [`5.0.0-nightly-${{ steps.nightly.outputs.version }}`](https://www.nuget.org/packages/DSharpPlus/5.0.0-nightly-${{ steps.nightly.outputs.version }})
Commit hash: [`${{ github.sha }}`](https://github.com/${{github.repository}}/commit/${{github.sha}})
Commit message: ``${{ steps.get_commit_message.outputs.message_header }}``
embed-color
:
7506394
document-commit
:
name
:
Document Commit
runs-on
:
ubuntu-latest
needs
:
package-commit
permissions
:
pages
:
write
id-token
:
write
environment
:
name
:
github-pages
url
:
${{ steps.deployment.outputs.page_url }}
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v4
with
:
submodules
:
recursive
fetch-depth
:
0
-
name
:
Setup .NET
uses
:
actions/setup-dotnet@v4
with
:
dotnet-version
:
9
-
name
:
Build Project
run
:
|
dotnet build
dotnet tool install -g docfx --version 2.78.5 --allow-downgrade
docfx docs/docfx.json
-
name
:
Upload GitHub Pages artifact
uses
:
actions/upload-pages-artifact@v3
with
:
path
:
./docs/_site/
-
name
:
Deploy to GitHub Pages
id
:
deployment
uses
:
actions/deploy-pages@v4
-
name
:
Reload Discord documentation
run
:
|
curl -X POST -H 'Authorization: Bot ${{ secrets.DISCORD_TOKEN }}' -H 'Content-Type: application/json' -d '{"content":"<@341606460720939008> reload"}' 'https://discord.com/api/v10/channels/379379415475552276/messages'
Back
|
FazBrowse Home
|
New Git URL