Skip to content

Commit 83a3e6b

Browse files
committed
Added release actions
1 parent d0c7a23 commit 83a3e6b

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/build.yml

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

0 commit comments

Comments
 (0)