diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1dfa581 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +name: Publish Release + +permissions: + contents: write + +on: + push: + branches: [ main ] + paths: + - 'plugin.json' + workflow_dispatch: + +jobs: + publish: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.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: Restore dependencies + run: dotnet restore + + - name: Build + run: | + dotnet publish -c Release -r win-x64 --no-self-contained Flow.Launcher.Plugin.LinkOpener.csproj + 7z a -tzip "Flow.Launcher.Plugin.LinkOpener.zip" "./bin/Release/win-x64/publish/*" + + - name: Publish + uses: softprops/action-gh-release@v1 + with: + files: "Flow.Launcher.Plugin.LinkOpener.zip" + tag_name: "v${{steps.version.outputs.prop}}"