From e1cca6427c4c1506499c5af940e1919ad6ac23be Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Thu, 8 Feb 2024 17:34:02 +0100 Subject: [PATCH] Add ci job for releasing to winget --- .github/workflows/win-exe.yml | 18 ++++++++++++++++++ .github/workflows/winget.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/winget.yml diff --git a/.github/workflows/win-exe.yml b/.github/workflows/win-exe.yml index 0461ab801..0ca2a7789 100644 --- a/.github/workflows/win-exe.yml +++ b/.github/workflows/win-exe.yml @@ -413,3 +413,21 @@ jobs: username: ${{ secrets.ALLOWLIST_AVAST_USERNAME }} password: ${{ secrets.ALLOWLIST_AVAST_PASSWORD }} local-dir: files/ + notify-winget: + name: Notify for winget-release + if: startsWith(github.ref, 'refs/tags/') + needs: [build-msi] + runs-on: ubuntu-latest + steps: + - name: Slack Notification + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_USERNAME: 'Cryptobot' + SLACK_ICON: false + SLACK_ICON_EMOJI: ':bot:' + SLACK_CHANNEL: 'cryptomator-desktop' + SLACK_TITLE: "MSI of ${{ github.event.repository.name }} ${{ github.event.release.tag_name }} published." + SLACK_MESSAGE: "Ready to ." + SLACK_FOOTER: false + MSG_MINIMAL: true \ No newline at end of file diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml new file mode 100644 index 000000000..a527e7398 --- /dev/null +++ b/.github/workflows/winget.yml @@ -0,0 +1,27 @@ +name: Publish MSI Installer to WinGet Community Repo + +on: + workflow_dispatch: + inputs: + tag: + description: 'Release tag' + required: true + +jobs: + winget: + name: Publish winget package + runs-on: windows-latest + steps: + - name: Sync winget-pkgs fork + run: | + gh auth login --with-token $env:SYNC_TOKEN + gh repo sync cryptomator/winget-pkgs -b master --force + env: + SYNC_TOKEN: ${{ secrets.CRYPTOBOT_WINGET_TOKEN }} + - name: Submit package + uses: vedantmgoyal2009/winget-releaser@v2 + with: + identifier: Cryptomator.Cryptomator + release-tag: ${{ inputs.tag }} + installers-regex: '\.msi$' + token: ${{ secrets.CRYPTOBOT_WINGET_TOKEN }} \ No newline at end of file