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 }}