Compare commits

..
Author SHA1 Message Date
Armin Schrenk 0da557068b prevent usage of cached zip file 2025-06-30 17:04:10 +02:00
Armin Schrenk 50fb1c3042 use same jpackage for msi and appimage 2025-06-30 12:07:58 +02:00
Armin Schrenk f2525791f8 fix path 2025-06-30 11:54:56 +02:00
Armin Schrenk 01d9fe32b5 use proper download url 2025-06-30 11:41:54 +02:00
Armin Schrenk 68e0da37f5 use patched jdk version to build msi on arm 2025-06-30 11:21:26 +02:00
Armin Schrenk 94eb1e365b replace token for PR creation 2025-06-26 15:40:06 +02:00
Armin SchrenkandGitHub 414ccad8fb Feature: Automate AUR release (#3910)
Extend/add workflows to automatically create PRs for aur and aur-bin repos for a release.
2025-06-26 15:35:59 +02:00
Armin Schrenk e57e5358c4 Add workflow to automatically create AUR PR on release 2025-06-25 16:15:46 +02:00
Armin Schrenk e24719ed19 [skip ci] Merge branch 'main' into develop 2025-06-24 16:28:03 +02:00
6 changed files with 177 additions and 6 deletions
+65 -1
View File
@@ -52,7 +52,6 @@ jobs:
java-version: ${{ env.JAVA_VERSION }} java-version: ${{ env.JAVA_VERSION }}
check-latest: true check-latest: true
cache: 'maven' cache: 'maven'
- name: Download OpenJFX jmods - name: Download OpenJFX jmods
id: download-jmods id: download-jmods
run: | run: |
@@ -194,3 +193,68 @@ jobs:
cryptomator-*.AppImage cryptomator-*.AppImage
cryptomator-*.zsync cryptomator-*.zsync
cryptomator-*.asc cryptomator-*.asc
create-aur-bin-pr:
name: Create PR for aur-bin repo
needs: [build, get-version]
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- name: Download AppImages
uses: actions/download-artifact@v4
with:
path: downloads/
merge-multiple: true
- name: Compute sha256 hash of AppImages
id: checksums
run: |
X64_SHA256=$(sha256sum downloads/cryptomator-*-x86_64.AppImage | cut -d ' ' -f1)
echo "x64-sha256sum=${X64_SHA256}" >> "$GITHUB_OUTPUT"
AARCH64_SHA256=$(sha256sum downloads/cryptomator-*-aarch64.AppImage | cut -d ' ' -f1)
echo "aarch64-sha256sum=${AARCH64_SHA256}" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
with:
repository: 'cryptomator/aur-bin'
token: ${{ secrets.CRYPTOBOT_PR_TOKEN }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install makepkg pacman-package-manager
- name: Checkout release branch
run: |
git checkout -b release/${{ needs.get-version.outputs.semVerStr }}
- name: Update build file
run: |
sed -i -e 's|^pkgver=.*$|pkgver=${{ needs.get-version.outputs.semVerStr }}|' PKGBUILD
sed -i -e 's|^pkgrel=.*$|pkgrel=1|' PKGBUILD
sed -i -e "s|^sha256sums_x86_64=.*$|sha256sums_x86_64=('${{ steps.checksums.outputs.x64-sha256sum }}'|" PKGBUILD
sed -i -e "s|^sha256sums_aarch64=.*$|sha256sums_aarch64=('${{ steps.checksums.outputs.aarch64-sha256sum}}'|" PKGBUILD
makepkg --printsrcinfo > .SRCINFO
- name: Commit and push
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
git config push.autoSetupRemote true
git stage .
git commit -m "Prepare release ${{needs.get-version.outputs.semVerStr}}"
git push
- name: Create pull request
id: create-pr
run: |
printf "> [!IMPORTANT]\n> Todos:\n> - [ ] Update build instructions\n> - [ ] Check for JDK update\n> - [ ] Check for JFX update" > pr_body.md
URL=$(gh pr create --title "Release ${{ needs.get-version.outputs.semVerStr }}" --body-file pr_body.md)
echo "PR_URL=$URL" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.CRYPTOBOT_PR_TOKEN }}
- 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: "AUR-bin release PR for ${{ github.event.repository.name }} ${{ github.event.release.tag_name }} created."
SLACK_MESSAGE: "See <${{ steps.create-pr.outputs.PR_URL }}|PR> on how to proceed."
SLACK_FOOTER: false
MSG_MINIMAL: true
+93
View File
@@ -0,0 +1,93 @@
name: Create PR for AUR
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: 'Release tag'
required: true
jobs:
get-version:
uses: ./.github/workflows/get-version.yml
with:
version: ${{ inputs.tag }}
tarball:
name: Determines tarball url and compute checksum
runs-on: ubuntu-latest
needs: [get-version]
if: github.event_name == 'workflow_dispatch' || needs.get-version.outputs.versionType == 'stable'
outputs:
url: ${{ steps.url.outputs.url}}
sha256: ${{ steps.sha256.outputs.sha256}}
steps:
- name: Determine tarball url
id: url
run: |
URL="";
if [[ -n "${{ inputs.tag }}" ]]; then
URL="https://github.com/cryptomator/cryptomator/archive/refs/tags/${{ inputs.tag }}.tar.gz"
else
URL="https://github.com/cryptomator/cryptomator/archive/refs/tags/${{ github.event.release.tag_name }}.tar.gz"
fi
echo "url=${URL}" >> "$GITHUB_OUTPUT"
- name: Download source tarball and compute checksum
id: sha256
run: |
curl --silent --fail-with-body -L -H "Accept: application/vnd.github+json" ${{ steps.url.outputs.url }} --output cryptomator.tar.gz
TARBALL_SHA256=$(sha256sum cryptomator.tar.gz | cut -d ' ' -f1)
echo "sha256=${TARBALL_SHA256}" >> "$GITHUB_OUTPUT"
aur:
name: Create PR for AUR
runs-on: ubuntu-latest
needs: [tarball, get-version]
env:
AUR_PR_URL: tbd
steps:
- uses: actions/checkout@v4
with:
repository: 'cryptomator/aur'
token: ${{ secrets.CRYPTOBOT_PR_TOKEN }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install makepkg pacman-package-manager
- name: Checkout release branch
run: |
git checkout -b release/${{ needs.get-version.outputs.semVerStr }}
- name: Update build file
run: |
sed -i -e 's|^pkgver=.*$|pkgver=${{ needs.get-version.outputs.semVerStr }}|' PKGBUILD
sed -i -e 's|^pkgrel=.*$|pkgrel=1|' PKGBUILD
sed -i -e "s|^sha256sums=.*$|sha256sums=('${{ needs.tarball.outputs.sha256 }}'|" PKGBUILD
makepkg --printsrcinfo > .SRCINFO
- name: Commit and push
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
git config push.autoSetupRemote true
git stage .
git commit -m "Prepare release ${{needs.get-version.outputs.semVerStr}}"
git push
- name: Create pull request
run: |
printf "> [!IMPORTANT]\n> Todos:\n> - [ ] Update build instructions\n> - [ ] Check for JDK update\n> - [ ] Check for JFX update" > pr_body.md
PR_URL=$(gh pr create --title "Release ${{ needs.get-version.outputs.semVerStr }}" --body-file pr_body.md)
echo "AUR_PR_URL=$PR_URL" >> "$GITHUB_ENV"
env:
GH_TOKEN: ${{ secrets.CRYPTOBOT_PR_TOKEN }}
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
if: github.event_name == 'release'
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_USERNAME: 'Cryptobot'
SLACK_ICON: false
SLACK_ICON_EMOJI: ':bot:'
SLACK_CHANNEL: 'cryptomator-desktop'
SLACK_TITLE: "AUR release PR created for ${{ github.event.repository.name }} ${{ github.event.release.tag_name }} created."
SLACK_MESSAGE: "See <${{ env.AUR_PR_URL }}|PR> on how to proceed."
SLACK_FOOTER: false
MSG_MINIMAL: true
+2 -2
View File
@@ -49,7 +49,7 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
repository: 'flathub/org.cryptomator.Cryptomator' repository: 'flathub/org.cryptomator.Cryptomator'
token: ${{ secrets.CRYPTOBOT_WINGET_TOKEN }} token: ${{ secrets.CRYPTOBOT_PR_TOKEN }}
- name: Checkout release branch - name: Checkout release branch
run: | run: |
git checkout -b release/${{ needs.get-version.outputs.semVerStr }} git checkout -b release/${{ needs.get-version.outputs.semVerStr }}
@@ -72,7 +72,7 @@ jobs:
PR_URL=$(gh pr create --title "Release ${{ needs.get-version.outputs.semVerStr }}" --body-file pr_body.md) PR_URL=$(gh pr create --title "Release ${{ needs.get-version.outputs.semVerStr }}" --body-file pr_body.md)
echo "FLATHUB_PR_URL=$PR_URL" >> "$GITHUB_ENV" echo "FLATHUB_PR_URL=$PR_URL" >> "$GITHUB_ENV"
env: env:
GH_TOKEN: ${{ secrets.CRYPTOBOT_WINGET_TOKEN }} GH_TOKEN: ${{ secrets.CRYPTOBOT_PR_TOKEN }}
- name: Slack Notification - name: Slack Notification
uses: rtCamp/action-slack-notify@v2 uses: rtCamp/action-slack-notify@v2
if: github.event_name == 'release' if: github.event_name == 'release'
+14
View File
@@ -129,6 +129,16 @@ jobs:
- name: Change win-console flag if debug is active - name: Change win-console flag if debug is active
if: ${{ inputs.isDebug }} if: ${{ inputs.isDebug }}
run: echo "WIN_CONSOLE_FLAG=--win-console" >> $GITHUB_ENV run: echo "WIN_CONSOLE_FLAG=--win-console" >> $GITHUB_ENV
- name: Setup patched JDK if necessary
id: setup-patched-jdk
run: |
if [ "${{ matrix.arch }}" == "arm64" ]; then
curl --output patched-jdk.zip -L "https://static.cryptomator.org/desktop/patched-win-jdk-2.zip"
unzip patched-jdk.zip -d patched-jdk
echo "JAVA_HOME=${{ github.workspace }}/patched-jdk/jdk" >> $GITHUB_OUTPUT
else
echo "JAVA_HOME=${JAVA_HOME}" >> $GITHUB_OUTPUT
fi
- name: Run jpackage - name: Run jpackage
run: > run: >
${JAVA_HOME}/bin/jpackage ${JAVA_HOME}/bin/jpackage
@@ -167,6 +177,8 @@ jobs:
--resource-dir dist/win/resources --resource-dir dist/win/resources
--icon dist/win/resources/Cryptomator.ico --icon dist/win/resources/Cryptomator.ico
${WIN_CONSOLE_FLAG} ${WIN_CONSOLE_FLAG}
env:
JAVA_HOME: ${{ steps.setup-patched-jdk.outputs.JAVA_HOME }}
- name: Patch Application Directory - name: Patch Application Directory
run: | run: |
cp dist/win/contrib/* appdir/Cryptomator cp dist/win/contrib/* appdir/Cryptomator
@@ -262,6 +274,7 @@ jobs:
--license-file dist/win/resources/license.rtf --license-file dist/win/resources/license.rtf
--file-associations dist/win/resources/FAvaultFile.properties --file-associations dist/win/resources/FAvaultFile.properties
env: env:
JAVA_HOME: ${{ steps.setup-patched-jdk.outputs.JAVA_HOME }}
JP_WIXWIZARD_RESOURCES: ${{ github.workspace }}/dist/win/resources # requires abs path, used in resources/main.wxs JP_WIXWIZARD_RESOURCES: ${{ github.workspace }}/dist/win/resources # requires abs path, used in resources/main.wxs
JP_WIXHELPER_DIR: ${{ github.workspace }}\appdir JP_WIXHELPER_DIR: ${{ github.workspace }}\appdir
- name: Codesign MSI - name: Codesign MSI
@@ -361,6 +374,7 @@ jobs:
working-directory: dist/win working-directory: dist/win
run: > run: >
wix build wix build
-arch ${{ matrix.arch }}
-define BundleName="Cryptomator" -define BundleName="Cryptomator"
-define BundleVersion="${{ needs.get-version.outputs.semVerNum }}.${{ needs.get-version.outputs.revNum}}" -define BundleVersion="${{ needs.get-version.outputs.semVerNum }}.${{ needs.get-version.outputs.revNum}}"
-define BundleVendor="Skymatic GmbH" -define BundleVendor="Skymatic GmbH"
+2 -2
View File
@@ -16,7 +16,7 @@ jobs:
run: | run: |
gh repo sync cryptomator/winget-pkgs -b master --force gh repo sync cryptomator/winget-pkgs -b master --force
env: env:
GH_TOKEN: ${{ secrets.CRYPTOBOT_WINGET_TOKEN }} GH_TOKEN: ${{ secrets.CRYPTOBOT_PR_TOKEN }}
- name: Submit package - name: Submit package
uses: vedantmgoyal2009/winget-releaser@main uses: vedantmgoyal2009/winget-releaser@main
with: with:
@@ -24,4 +24,4 @@ jobs:
version: ${{ inputs.tag }} version: ${{ inputs.tag }}
release-tag: ${{ inputs.tag }} release-tag: ${{ inputs.tag }}
installers-regex: '-x64\.msi$' installers-regex: '-x64\.msi$'
token: ${{ secrets.CRYPTOBOT_WINGET_TOKEN }} token: ${{ secrets.CRYPTOBOT_PR_TOKEN }}
+1 -1
View File
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.cryptomator</groupId> <groupId>org.cryptomator</groupId>
<artifactId>cryptomator</artifactId> <artifactId>cryptomator</artifactId>
<version>1.17.0</version> <version>1.18.0-SNAPSHOT</version>
<name>Cryptomator Desktop App</name> <name>Cryptomator Desktop App</name>
<organization> <organization>