Skip to content

Commit 9a1c5a2

Browse files
authored
Allow running publish manually
1 parent 75a7d8e commit 9a1c5a2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/publish.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,26 @@ name: publish
66
on:
77
release:
88
types: [prereleased, released]
9+
workflow_dispatch:
10+
inputs:
11+
configuration:
12+
type: choice
13+
description: Configuration
14+
options:
15+
- Release
16+
- Debug
17+
sha:
18+
description: 'Optional commit to deploy (latest if empty)'
19+
version:
20+
description: 'SemVer version to use (0.1.0-preview.[build] if empty)'
921

1022
env:
1123
DOTNET_NOLOGO: true
1224
Configuration: Release
1325
PackOnBuild: true
1426
GeneratePackageOnBuild: true
1527
VersionLabel: ${{ github.ref }}
28+
VersionOrTag: ${{ github.event.inputs.version || github.event.release.tag_name || format('0.1.0-preview.{0}', github.run_number) }}
1629
GH_TOKEN: ${{ secrets.GH_TOKEN }}
1730
MSBUILDTERMINALLOGGER: auto
1831
SLEET_FEED_URL: https://api.nuget.org/v3/index.json
@@ -30,6 +43,9 @@ jobs:
3043
- name: ⚙ dotnet
3144
uses: devlooped/actions-dotnet-env@v1
3245

46+
- name: 📝 version
47+
run: echo "Version=${VersionOrTag/v}" >> $GITHUB_ENV
48+
3349
- name: 🙏 build
3450
run: dotnet build -m:1 -bl:build.binlog
3551

0 commit comments

Comments
 (0)