From e580e6e9420465132e15474717c0987207164518 Mon Sep 17 00:00:00 2001 From: Odotocodot <48138990+Odotocodot@users.noreply.github.com> Date: Fri, 16 Dec 2022 14:13:11 +0000 Subject: [PATCH] Add github workflow --- .github/workflows/publish.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..9316b04 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,38 @@ +name: Publish + +on: + push: + branches: [ master ] + +jobs: + build: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.x + + - name: get version + id: version + uses: notiz-dev/github-action-json-property@release + with: + path: 'plugin.json' + prop_path: 'Version' + + - run: echo ${{steps.version.outputs.prop}} + + - name: Build + run: | + dotnet publish -c Release -r win-x64 Flow.Launcher.Plugin.OneNote.csproj + 7z a -tzip "Flow.Launcher.Plugin.OneNote.zip" "./bin/Release/win-x64/publish/*" + + - name: Publish + uses: softprops/action-gh-release@v1 + with: + files: "Flow.Launcher.Plugin.OneNote.zip" + tag_name: "v${{steps.version.outputs.prop}}" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}