Skip to content

Commit 1d55b92

Browse files
committed
Upload build output to a release if one is created
1 parent a73641c commit 1d55b92

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/msbuild.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@ on:
55
branches: [ "master" ]
66
pull_request:
77
branches: [ "master" ]
8+
release:
9+
types: [created] # Trigger when a new release is created
810

911
env:
1012
SOLUTION_FILE_PATH: .
1113
BUILD_CONFIGURATION: Release
1214
PLATFORM: x86
1315

1416
permissions:
15-
contents: read
17+
contents: write
18+
id-token: write
19+
actions: read
1620

1721
jobs:
1822
build:
@@ -55,3 +59,23 @@ jobs:
5559
path: |
5660
Release/*.dll
5761
Release/*.json
62+
63+
upload_release:
64+
runs-on: ubuntu-latest
65+
needs: build
66+
if: github.event_name == 'release' # Only runs when a release is created
67+
68+
steps:
69+
- name: Download Build Artifacts from Build Job
70+
id: download-artifact
71+
uses: dawidd6/action-download-artifact@v7
72+
with:
73+
run_id: ${{ github.event.workflow_run.id }}
74+
path: plugin-artifacts
75+
76+
- name: Upload binaries to release
77+
uses: svenstaro/upload-release-action@v2
78+
with:
79+
tag: ${{ github.ref }}
80+
file: plugin-artifacts/**/*
81+
file_glob: true

0 commit comments

Comments
 (0)