Skip to content

Commit bb4e0b8

Browse files
2 parents 6d40c51 + e8e0587 commit bb4e0b8

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: .NET
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
actions: read
15+
contents: read
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup .NET
21+
uses: actions/setup-dotnet@v4
22+
with:
23+
dotnet-version: 8.0.x
24+
25+
- name: Restore dependencies
26+
run: dotnet restore
27+
28+
- name: Build
29+
run: dotnet build --no-restore -c Debug
30+
31+
- name: Upload a Build Artifact
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: iis_Stupid_Menu-Beta
35+
path: bin/Debug/netstandard2.1/ii's Stupid Menu.dll
36+
37+
- name: Get Artifact URL
38+
id: artifact_url
39+
run: |
40+
ARTIFACT_RESPONSE=$(curl -s \
41+
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
42+
-H "Accept: application/vnd.github+json" \
43+
"https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts")
44+
45+
ARTIFACT_ID=$(echo "$ARTIFACT_RESPONSE" | jq -r '.artifacts[0].id')
46+
echo "artifact_id=$ARTIFACT_ID" >> $GITHUB_OUTPUT
47+
echo "artifact_url=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/$ARTIFACT_ID" >> $GITHUB_OUTPUT
48+
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)