Skip to content

Commit daf9c32

Browse files
authored
Create publish.yml
1 parent 01bb574 commit daf9c32

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/publish.yml

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

0 commit comments

Comments
 (0)