diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..d2fe3dc --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,36 @@ +name: Publish Release +on: + workflow_dispatch: + push: + branches: + - master + paths-ignore: + - .github/workflows/* + +jobs: + publish: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + 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" + - name: Build + run: | + dotnet publish -c Release -r win-x64 -o "Flow.Launcher.Plugin.Cider2" + 7z a -tzip "Flow.Launcher.Plugin.Cider2-${{ steps.version.outputs.prop }}.zip" "./Flow.Launcher.Plugin.Cider2/*" + - name: Publish + uses: softprops/action-gh-release@v1 + with: + files: Flow.Launcher.Plugin.Cider2-${{ steps.version.outputs.prop }}.zip + tag_name: ${{ steps.version.outputs.prop }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}