Skip to content

Commit 063599f

Browse files
Trigger publish on GitHub release
1 parent d863803 commit 063599f

File tree

3 files changed

+39
-6
lines changed

3 files changed

+39
-6
lines changed

.github/workflows/publish-release.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
DOTNET_NOLOGO: true
8+
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
9+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
10+
11+
jobs:
12+
publish-release:
13+
name: Publish release (tag)
14+
runs-on: windows-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Configure git
23+
run: |
24+
git config user.name 'github-actions[bot]'
25+
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
26+
27+
- name: Setup Nerdbank.GitVersioning
28+
run: dotnet tool install nbgv --global
29+
30+
- name: Tag release
31+
run: nbgv tag -p src
32+
33+
- name: Push tag
34+
run: git push --tags

.github/workflows/publish.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
name: Publish
22

33
on:
4-
push:
5-
tags:
6-
- 'release-*'
7-
- 'v*'
4+
release:
5+
types: [published]
86

97
env:
108
DOTNET_NOLOGO: true

UI Examples.sln

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
77
ProjectSection(SolutionItems) = preProject
88
.gitattributes = .gitattributes
99
.gitignore = .gitignore
10-
.github\workflows\build.yml = .github\workflows\build.yml
1110
CONTRIBUTING.md = CONTRIBUTING.md
11+
README.md = README.md
12+
.github\workflows\build.yml = .github\workflows\build.yml
1213
.github\workflows\prepare-release.yml = .github\workflows\prepare-release.yml
14+
.github\workflows\publish-release.yml = .github\workflows\publish-release.yml
1315
.github\workflows\publish.yml = .github\workflows\publish.yml
14-
README.md = README.md
1516
src\version.json = src\version.json
1617
EndProjectSection
1718
EndProject

0 commit comments

Comments
 (0)