Skip to content

Commit e580e6e

Browse files
authored
Add github workflow
1 parent 0034036 commit e580e6e

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
build:
9+
runs-on: windows-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Setup .NET
14+
uses: actions/setup-dotnet@v1
15+
with:
16+
dotnet-version: 6.0.x
17+
18+
- name: get version
19+
id: version
20+
uses: notiz-dev/github-action-json-property@release
21+
with:
22+
path: 'plugin.json'
23+
prop_path: 'Version'
24+
25+
- run: echo ${{steps.version.outputs.prop}}
26+
27+
- name: Build
28+
run: |
29+
dotnet publish -c Release -r win-x64 Flow.Launcher.Plugin.OneNote.csproj
30+
7z a -tzip "Flow.Launcher.Plugin.OneNote.zip" "./bin/Release/win-x64/publish/*"
31+
32+
- name: Publish
33+
uses: softprops/action-gh-release@v1
34+
with:
35+
files: "Flow.Launcher.Plugin.OneNote.zip"
36+
tag_name: "v${{steps.version.outputs.prop}}"
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)