diff --git a/.crowdin.yml b/.crowdin.yml index 719c29826..ab4470ffa 100644 --- a/.crowdin.yml +++ b/.crowdin.yml @@ -1,5 +1,6 @@ -commit_message: "[ci skip]" -escape_special_characters: 0 +commit_message: '[ci skip]' files: - - source: /main/ui/src/main/resources/i18n/strings.properties - translation: /main/ui/src/main/resources/i18n/strings_%two_letters_code%.properties + - source: /src/main/resources/i18n/strings.properties + translation: /src/main/resources/i18n/strings_%two_letters_code%.properties + escape_quotes: 0 + escape_special_characters: 0 diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 3a7337fe3..83ec96635 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -22,7 +22,7 @@ include: Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or +* The use of sexual language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md deleted file mode 100644 index 190104a47..000000000 --- a/.github/ISSUE_TEMPLATE/bug.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -name: "Bug Report" -about: "Create a report to help us improve" -labels: type:bug ---- - - - -### Description - -[Summarize your problem.] - -### System Setup - -* Operating system and version: [Windows/macOS/Linux + Version ( + Desktop Environment, if Linux)] -* Cryptomator version: [Shown in the settings] -* Volume type: [Dokany/FUSE/WebDAV, shown in the settings] - -### Steps to Reproduce - -1. [First step] -2. [Second step] -3. [and so on…] - -#### Expected Behavior - -[What you expect to happen.] - -#### Actual Behavior - -[What actually happens.] - -#### Reproducibility - -[Always/Intermittent/Only once] - -### Additional Information - -[Any additional information, log files, screenshots, configuration, or data that might be necessary to reproduce the issue.] - - diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 000000000..70bf9654f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,93 @@ +name: Bug Report +description: Create a report to help us improve +labels: ["type:bug"] +body: + - type: checkboxes + id: terms + attributes: + label: Please agree to the following + options: + - label: I have searched [existing issues](https://github.com/cryptomator/cryptomator/issues?q=) for duplicates + required: true + - label: I agree to follow this project's [Code of Conduct](https://github.com/cryptomator/cryptomator/blob/develop/.github/CODE_OF_CONDUCT.md) + required: true + - type: input + id: summary + attributes: + label: Summary + placeholder: Please summarize your problem. + validations: + required: true + - type: textarea + id: software-versions + attributes: + label: What software is involved? + description: | + Examples: + - Operating System: Windows 10 + - Cryptomator: 1.5.16 + - LibreOffice: 7.1.4 + value: | + - Operating System: + - Cryptomator: + - … + validations: + required: true + - type: dropdown + id: volume-type + attributes: + label: Volume Type + description: What is selected under Settings → Virtual Drive? + multiple: true + options: + - FUSE + - Dokany + - WebDAV + validations: + required: false + - type: textarea + id: reproduction-steps + attributes: + label: Steps to Reproduce + value: | + 1. [First Step] + 2. [Second Step] + 3. … + validations: + required: true + - type: textarea + id: expected-behaviour + attributes: + label: Expected Behavior + placeholder: What you expect to happen. + validations: + required: true + - type: textarea + id: actual-behaviour + attributes: + label: Actual Behavior + placeholder: What actually happens. + validations: + required: true + - type: dropdown + id: reproducibility + attributes: + label: Reproducibility + description: How often does the described behaviour occur? + options: + - Always + - Intermittent + - Only once + validations: + required: true + - type: textarea + id: logs + attributes: + label: Relevant Log Output + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: shell + - type: textarea + id: further-info + attributes: + label: Anything else? + description: Links? References? Screenshots? Configurations? Any data that might be necessary to reproduce the issue? \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md deleted file mode 100644 index 366f7ecca..000000000 --- a/.github/ISSUE_TEMPLATE/feature.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: "Feature Request" -about: "Suggest an idea for this project" -labels: type:feature-request ---- - - - -### Summary - -[One paragraph explanation of the feature.] - -### Motivation - -[Why are we doing this? What use cases does it support? What is the expected outcome?] - -### Considered Alternatives - -[A clear and concise description of the alternative solutions you've considered.] - -### Additional Context - -[Add any other context or screenshots about the feature request here.] diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 000000000..652f27234 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,37 @@ +name: Feature Request +description: Suggest an idea for this project +labels: ["type:feature-request"] +body: + - type: checkboxes + id: terms + attributes: + label: Please agree to the following + options: + - label: I have searched [existing issues](https://github.com/cryptomator/cryptomator/issues?q=) for duplicates + required: true + - label: I agree to follow this project's [Code of Conduct](https://github.com/cryptomator/cryptomator/blob/develop/.github/CODE_OF_CONDUCT.md) + required: true + - type: input + id: summary + attributes: + label: Summary + placeholder: Please summarize your feature request. + validations: + required: true + - type: textarea + id: motivation + attributes: + label: Motivation + description: Who requires this feature? What problem does the user face? How would this feature solve the problem? + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Considered Alternatives + description: What current alternatives or workarounds have you considered? Is there a different way to solve the same problem? + - type: textarea + id: context + attributes: + label: Anything else? + description: Any context, suggestions, screenshots, or concepts you want to share? \ No newline at end of file diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index c7dc14547..f9ef8460a 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -14,5 +14,5 @@ For _everything else_, please visit our official [Cryptomator Community](https:/ - Discussions about the apps - [Development discussions](https://community.cryptomator.org/c/development) - General questions - - Discussions regarding our design decissions + - Discussions regarding our design decisions - Our roadmap diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8a464f599..2ffc3070e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,133 +1,35 @@ name: Build on: - [push] + push: + pull_request_target: + types: [labeled] + +env: + JAVA_VERSION: 17 + +defaults: + run: + shell: bash jobs: - build: - name: Build and Test + test: + name: Compile and Test runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" steps: - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: - java-version: 16 - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Ensure to use tagged version - run: mvn versions:set --file main/pom.xml -DnewVersion=${GITHUB_REF##*/} # use shell parameter expansion to strip of 'refs/tags' - if: startsWith(github.ref, 'refs/tags/') + distribution: 'temurin' + java-version: ${{ env.JAVA_VERSION }} + cache: 'maven' - name: Build and Test - run: mvn -B install --file main/pom.xml -Pcoverage - - name: Run Codacy Coverage Reporter - if: github.repository == 'cryptomator/cryptomator' - run: | - curl -o ~/codacy-coverage-reporter.jar https://repo.maven.apache.org/maven2/com/codacy/codacy-coverage-reporter/7.1.0/codacy-coverage-reporter-7.1.0-assembly.jar - $JAVA_HOME/bin/java --illegal-access=permit -jar ~/codacy-coverage-reporter.jar report -l Java -r main/commons/target/site/jacoco/jacoco.xml --partial - $JAVA_HOME/bin/java --illegal-access=permit -jar ~/codacy-coverage-reporter.jar report -l Java -r main/ui/target/site/jacoco/jacoco.xml --partial - $JAVA_HOME/bin/java --illegal-access=permit -jar ~/codacy-coverage-reporter.jar report -l Java -r main/launcher/target/site/jacoco/jacoco.xml --partial - $JAVA_HOME/bin/java --illegal-access=permit -jar ~/codacy-coverage-reporter.jar final + run: mvn -B clean install jacoco:report -Pcoverage,dependency-check + - name: Upload code coverage report + id: codacyCoverageReporter + if: "github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'pr:safe')" + run: bash <(curl -Ls https://coverage.codacy.com/get.sh) env: CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} - - name: Assemble buildkit-linux.zip - run: mvn -B clean package -DskipTests --file main/pom.xml --resume-from=buildkit -Prelease,linux - - name: Upload buildkit-linux.zip - uses: actions/upload-artifact@v1 - with: - name: buildkit-linux.zip - path: main/buildkit/target/buildkit-linux.zip - - name: Assemble buildkit-mac.zip - run: mvn -B clean package -DskipTests --file main/pom.xml --resume-from=buildkit -Prelease,mac - - name: Upload buildkit-mac.zip - uses: actions/upload-artifact@v1 - with: - name: buildkit-mac.zip - path: main/buildkit/target/buildkit-mac.zip - - name: Assemble buildkit-win.zip - run: mvn -B clean package -DskipTests --file main/pom.xml --resume-from=buildkit -Prelease,windows - - name: Upload buildkit-win.zip - uses: actions/upload-artifact@v1 - with: - name: buildkit-win.zip - path: main/buildkit/target/buildkit-win.zip - - release: - name: Draft a Release on GitHub Releases - runs-on: ubuntu-latest - needs: build - if: startsWith(github.ref, 'refs/tags/') && github.repository == 'cryptomator/cryptomator' - steps: - - name: Download buildkit-linux.zip - uses: actions/download-artifact@v1 - with: - name: buildkit-linux.zip - path: . - - name: Download buildkit-mac.zip - uses: actions/download-artifact@v1 - with: - name: buildkit-mac.zip - path: . - - name: Download buildkit-win.zip - uses: actions/download-artifact@v1 - with: - name: buildkit-win.zip - path: . - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - body: | - :construction: Work in Progress - - TODO: - * [ ] add Linux appimage, zsync file and signature file - * [ ] add Windows installer and signature file - * [ ] add MacOs disk image and signature file - - ## What's new - - ## Bugfixes - - ## Misc - - --- - - :scroll: A complete list of closed issues is available [here](LINK) - draft: true - prerelease: false - - name: Upload buildkit-linux.zip to GitHub Releases - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: buildkit-linux.zip - asset_name: buildkit-linux.zip - asset_content_type: application/zip - - name: Upload buildkit-mac.zip to GitHub Releases - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: buildkit-mac.zip - asset_name: buildkit-mac.zip - asset_content_type: application/zip - - name: Upload buildkit-win.zip to GitHub Releases - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: buildkit-win.zip - asset_name: buildkit-win.zip - asset_content_type: application/zip \ No newline at end of file + continue-on-error: true \ No newline at end of file diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml new file mode 100644 index 000000000..c529ca09b --- /dev/null +++ b/.github/workflows/pullrequest.yml @@ -0,0 +1,26 @@ +name: Pull Request + +on: + pull_request: + +env: + JAVA_VERSION: 17 + +defaults: + run: + shell: bash + +jobs: + test: + name: Compile and Test + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: ${{ env.JAVA_VERSION }} + cache: 'maven' + - name: Build and Test + run: mvn -B clean install jacoco:report -Pcoverage,dependency-check \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..32e10bdec --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,624 @@ +name: Installers and Release + +on: + workflow_dispatch: + inputs: + semver: + description: 'SemVer' + required: true + default: '0.99.99-SNAPSHOT' + push: + tags: # see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet + - '[0-9]+.[0-9]+.[0-9]+' + - '[0-9]+.[0-9]+.[0-9]+-*' + +env: + JAVA_VERSION: 17 + +defaults: + run: + shell: bash + +jobs: + +# +# Buildkit +# + buildkit: + name: Build ${{ matrix.profile }}-buildkit + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + include: + - os: ubuntu-latest + profile: linux + - os: windows-latest + profile: win + - os: macos-latest + profile: mac + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: ${{ env.JAVA_VERSION }} + - uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Ensure to use tagged version + run: mvn versions:set -DnewVersion=${GITHUB_REF##*/} # use shell parameter expansion to strip of 'refs/tags' + if: startsWith(github.ref, 'refs/tags/') + - name: Build and Test + run: mvn -B clean package -Pdependency-check,${{ matrix.profile }} + - name: Patch buildkit + run: | + cp LICENSE.txt target + cp dist/${{ matrix.profile }}/launcher* target + cp target/cryptomator-*.jar target/mods + - name: Upload ${{ matrix.profile }}-buildkit + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.profile }}-buildkit + path: | + target/libs + target/mods + target/LICENSE.txt + target/launcher* + if-no-files-found: error + +# +# Release Metadata +# + metadata: + name: Determine Version Metadata + runs-on: ubuntu-latest + outputs: + semVerNum: ${{ steps.versions.outputs.semVerNum }} + semVerStr: ${{ steps.versions.outputs.semVerStr }} + ppaVerStr: ${{ steps.versions.outputs.ppaVerStr }} + revNum: ${{ steps.versions.outputs.revNum }} + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - id: versions + run: | + if [[ $GITHUB_REF == refs/tags/* ]]; then + SEM_VER_STR=${GITHUB_REF##*/} + else + SEM_VER_STR=${{ github.event.inputs.semver }} + fi + SEM_VER_NUM=`echo ${SEM_VER_STR} | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+).*/\1/'` + REVCOUNT=`git rev-list --count HEAD` + echo "::set-output name=semVerStr::${SEM_VER_STR}" + echo "::set-output name=semVerNum::${SEM_VER_NUM}" + echo "::set-output name=ppaVerStr::${SEM_VER_STR/-/\~}-${REVCOUNT}" + echo "::set-output name=revNum::${REVCOUNT}" + - uses: skymatic/semver-validation-action@v1 + with: + version: ${{ steps.versions.outputs.semVerStr }} + +# +# Application Directory +# + appdir: + name: Create ${{ matrix.profile }}-appdir + needs: [buildkit, metadata] + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + include: + - os: ubuntu-latest + profile: linux + jpackageoptions: > + --app-version "${{ needs.metadata.outputs.semVerNum }}.${{ needs.metadata.outputs.revNum }}" + --java-options "-Dfile.encoding=\"utf-8\"" + --java-options "-Dcryptomator.logDir=\"~/.local/share/Cryptomator/logs\"" + --java-options "-Dcryptomator.pluginDir=\"~/.local/share/Cryptomator/plugins\"" + --java-options "-Dcryptomator.settingsPath=\"~/.config/Cryptomator/settings.json:~/.Cryptomator/settings.json\"" + --java-options "-Dcryptomator.ipcSocketPath=\"~/.config/Cryptomator/ipc.socket\"" + --java-options "-Dcryptomator.mountPointsDir=\"~/.local/share/Cryptomator/mnt\"" + --java-options "-Dcryptomator.showTrayIcon=false" + --java-options "-Dcryptomator.buildNumber=\"appimage-${{ needs.metadata.outputs.revNum }}\"" + --resource-dir dist/linux/resources + - os: windows-latest + profile: win + jpackageoptions: > + --app-version "${{ needs.metadata.outputs.semVerNum }}.${{ needs.metadata.outputs.revNum }}" + --java-options "-Dfile.encoding=\"utf-8\"" + --java-options "-Dcryptomator.logDir=\"~/AppData/Roaming/Cryptomator\"" + --java-options "-Dcryptomator.pluginDir=\"~/AppData/Roaming/Cryptomator/Plugins\"" + --java-options "-Dcryptomator.settingsPath=\"~/AppData/Roaming/Cryptomator/settings.json\"" + --java-options "-Dcryptomator.ipcSocketPath=\"~/AppData/Roaming/Cryptomator/ipc.socket\"" + --java-options "-Dcryptomator.keychainPath=\"~/AppData/Roaming/Cryptomator/keychain.json\"" + --java-options "-Dcryptomator.mountPointsDir=\"~/Cryptomator\"" + --java-options "-Dcryptomator.showTrayIcon=true" + --java-options "-Dcryptomator.buildNumber=\"msi-${{ needs.metadata.outputs.revNum }}\"" + --resource-dir dist/win/resources + --icon dist/win/resources/Cryptomator.ico + - os: macos-latest + profile: mac + jpackageoptions: > + --app-version "${{ needs.metadata.outputs.semVerNum }}" + --java-options "-Dfile.encoding=\"utf-8\"" + --java-options "-Dcryptomator.logDir=\"~/Library/Logs/Cryptomator\"" + --java-options "-Dcryptomator.pluginDir=\"~/Library/Application Support/Cryptomator/Plugins\"" + --java-options "-Dcryptomator.settingsPath=\"~/Library/Application Support/Cryptomator/settings.json\"" + --java-options "-Dcryptomator.ipcSocketPath=\"~/Library/Application Support/Cryptomator/ipc.socket\"" + --java-options "-Dcryptomator.showTrayIcon=true" + --java-options "-Dcryptomator.buildNumber=\"dmg-${{ needs.metadata.outputs.revNum }}\"" + --mac-package-identifier org.cryptomator + --resource-dir dist/mac/resources + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: ${{ env.JAVA_VERSION }} + - name: Download ${{ matrix.profile }}-buildkit + uses: actions/download-artifact@v2 + with: + name: ${{ matrix.profile }}-buildkit + path: buildkit + - name: Create Runtime Image + run: > + ${JAVA_HOME}/bin/jlink + --verbose + --output runtime + --module-path "${JAVA_HOME}/jmods" + --add-modules java.base,java.desktop,java.logging,java.naming,java.net.http,java.scripting,java.sql,java.xml,jdk.unsupported,jdk.crypto.ec,jdk.accessibility + --no-header-files + --no-man-pages + --strip-debug + --compress=1 + - name: Create App Directory + run: > + ${JAVA_HOME}/bin/jpackage + --verbose + --type app-image + --runtime-image runtime + --input buildkit/libs + --module-path buildkit/mods + --module org.cryptomator.desktop/org.cryptomator.launcher.Cryptomator + --dest appdir + --name Cryptomator + --vendor "Skymatic GmbH" + --copyright "(C) 2016 - 2021 Skymatic GmbH" + --java-options "-Xss5m" + --java-options "-Xmx256m" + --java-options "-Dcryptomator.appVersion=\"${{ needs.metadata.outputs.semVerStr }}\"" + ${{ matrix.jpackageoptions }} + - name: Create appdir.tar + run: tar -cvf appdir.tar appdir + - name: Upload ${{ matrix.profile }}-appdir + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.profile }}-appdir + path: appdir.tar + if-no-files-found: error + +# +# Linux PPA Source Package +# + ppa: + name: Upload source package to PPA + needs: [buildkit, metadata] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: install build tools + run: | + sudo apt-get update + sudo apt-get install debhelper devscripts dput + - name: Download linux-buildkit + uses: actions/download-artifact@v2 + with: + name: linux-buildkit + path: pkgdir + - name: create orig.tar.gz + run: tar -cJf cryptomator_${{ needs.metadata.outputs.ppaVerStr }}.orig.tar.xz -C pkgdir . + - name: patch and rename pkgdir + run: | + cp -r dist/linux/debian/ pkgdir + cp -r dist/linux/resources/ pkgdir + export RFC2822_TIMESTAMP=`date --rfc-2822` + envsubst '${VERSION_STR} ${VERSION_NUM} ${REVISION_NUM}' < dist/linux/debian/rules > pkgdir/debian/rules + envsubst '${VERSION_STR}' < dist/linux/debian/org.cryptomator.Cryptomator.desktop > pkgdir/debian/org.cryptomator.Cryptomator.desktop + envsubst '${PPA_VERSION} ${RFC2822_TIMESTAMP}' < dist/linux/debian/changelog > pkgdir/debian/changelog + find . -name "*.jar" >> pkgdir/debian/source/include-binaries + mv pkgdir cryptomator_${{ needs.metadata.outputs.ppaVerStr }} + env: + VERSION_STR: ${{ needs.metadata.outputs.semVerStr }} + VERSION_NUM: ${{ needs.metadata.outputs.semVerNum }} + REVISION_NUM: ${{ needs.metadata.outputs.revNum }} + PPA_VERSION: ${{ needs.metadata.outputs.ppaVerStr }}-0ppa1 + - name: import gpg key 615D449FE6E6A235 + run: | + echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import + echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --dry-run --sign dist/linux/debian/rules + env: + GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} + GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }} + - name: debuild + run: debuild -S -sa -d + env: + DEBSIGN_PROGRAM: gpg --batch --pinentry-mode loopback + DEBSIGN_KEYID: 615D449FE6E6A235 + working-directory: cryptomator_${{ needs.metadata.outputs.ppaVerStr }} + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: linux-deb-source-package + path: | + cryptomator_*.dsc + cryptomator_*.orig.tar.xz + cryptomator_*.debian.tar.xz + cryptomator_*_source.changes + cryptomator_*_source.buildinfo + - name: dput to beta repo + run: dput ppa:sebastian-stenzel/cryptomator-beta cryptomator_${PPA_VERSION}_source.changes + env: + PPA_VERSION: ${{ needs.metadata.outputs.ppaVerStr }}-0ppa1 + +# +# Linux Cryptomator.AppImage +# + linux-appimage: + name: Build Cryptomator.AppImage + runs-on: ubuntu-latest + needs: [appdir, metadata] + steps: + - uses: actions/checkout@v2 + - name: Download linux-appdir + uses: actions/download-artifact@v2 + with: + name: linux-appdir + - name: Untar appdir.tar + run: | + tar -xvf appdir.tar + - name: Patch Cryptomator.AppDir + run: | + mv appdir/Cryptomator Cryptomator.AppDir + cp -r dist/linux/appimage/resources/AppDir/* Cryptomator.AppDir/ + envsubst '${REVISION_NO} ${SEMVER_STR}' < dist/linux/appimage/resources/AppDir/bin/cryptomator.sh > Cryptomator.AppDir/bin/cryptomator.sh + ln -s usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/org.cryptomator.Cryptomator.svg + ln -s usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/Cryptomator.svg + ln -s usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/.DirIcon + ln -s usr/share/applications/org.cryptomator.Cryptomator.desktop Cryptomator.AppDir/Cryptomator.desktop + ln -s bin/cryptomator.sh Cryptomator.AppDir/AppRun + env: + REVISION_NO: ${{ needs.metadata.outputs.revNum }} + SEMVER_STR: ${{ needs.metadata.outputs.semVerStr }} + - name: Extract libjffi.so # workaround for https://github.com/cryptomator/cryptomator-linux/issues/27 + run: | + JFFI_NATIVE_JAR=`ls lib/app/ | grep -e 'jffi-[1-9]\.[0-9]\{1,2\}.[0-9]\{1,2\}-native.jar'` + ${JAVA_HOME}/bin/jar -xf lib/app/${JFFI_NATIVE_JAR} /jni/x86_64-Linux/ + mv jni/x86_64-Linux/* lib/app/libjffi.so + working-directory: Cryptomator.AppDir + - name: Download AppImageKit + run: | + curl -L https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage -o appimagetool.AppImage + chmod +x appimagetool.AppImage + ./appimagetool.AppImage --appimage-extract + - name: Prepare GPG-Agent for signing with key 615D449FE6E6A235 + run: | + echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import + echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --dry-run --sign Cryptomator.AppDir/AppRun + env: + GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} + GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }} + - name: Build AppImage + run: > + ./squashfs-root/AppRun Cryptomator.AppDir cryptomator-${{ needs.metadata.outputs.semVerStr }}-x86_64.AppImage + -u 'gh-releases-zsync|cryptomator|cryptomator|latest|cryptomator-*-x86_64.AppImage.zsync' + --sign --sign-key=615D449FE6E6A235 --sign-args="--batch --pinentry-mode loopback" + - name: Upload AppImage + uses: actions/upload-artifact@v2 + with: + name: linux-appimage + path: | + cryptomator-*.AppImage + cryptomator-*.AppImage.zsync + if-no-files-found: error + +# +# macOS Cryptomator.app +# + mac-app: + name: Build Cryptomator.app + runs-on: macos-latest + needs: [appdir, metadata] + steps: + - uses: actions/checkout@v2 + - name: Download mac-appdir + uses: actions/download-artifact@v2 + with: + name: mac-appdir + - name: Untar appdir.tar + run: tar -xvf appdir.tar + - name: Patch Cryptomator.app + run: | + mv appdir/Cryptomator.app Cryptomator.app + mv dist/mac/resources/Cryptomator-Vault.icns Cryptomator.app/Contents/Resources/ + sed -i '' "s|###BUNDLE_SHORT_VERSION_STRING###|${VERSION_NO}|g" Cryptomator.app/Contents/Info.plist + sed -i '' "s|###BUNDLE_VERSION###|${REVISION_NO}|g" Cryptomator.app/Contents/Info.plist + env: + VERSION_NO: ${{ needs.metadata.outputs.semVerNum }} + REVISION_NO: ${{ needs.metadata.outputs.revNum }} + - name: Install codesign certificate + env: + CODESIGN_P12_BASE64: ${{ secrets.MACOS_CODESIGN_P12_BASE64 }} + CODESIGN_P12_PW: ${{ secrets.MACOS_CODESIGN_P12_PW }} + CODESIGN_TMP_KEYCHAIN_PW: ${{ secrets.MACOS_CODESIGN_TMP_KEYCHAIN_PW }} + run: | + # create variables + CERTIFICATE_PATH=$RUNNER_TEMP/codesign.p12 + KEYCHAIN_PATH=$RUNNER_TEMP/codesign.keychain-db + + # import certificate and provisioning profile from secrets + echo -n "$CODESIGN_P12_BASE64" | base64 --decode --output $CERTIFICATE_PATH + + # create temporary keychain + security create-keychain -p "$CODESIGN_TMP_KEYCHAIN_PW" $KEYCHAIN_PATH + security set-keychain-settings -lut 900 $KEYCHAIN_PATH + security unlock-keychain -p "$CODESIGN_TMP_KEYCHAIN_PW" $KEYCHAIN_PATH + + # import certificate to keychain + security import $CERTIFICATE_PATH -P "$CODESIGN_P12_PW" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH + security list-keychain -d user -s $KEYCHAIN_PATH + - name: Codesign + env: + CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }} + run: | + find Cryptomator.app/Contents/runtime/Contents/MacOS -name '*.dylib' -exec codesign --force -s ${CODESIGN_IDENTITY} {} \; + for JAR_PATH in `find Cryptomator.app -name "*.jar"`; do + if [[ `unzip -l ${JAR_PATH} | grep '.dylib\|.jnilib'` ]]; then + JAR_FILENAME=$(basename ${JAR_PATH}) + OUTPUT_PATH=${JAR_PATH%.*} + echo "Codesigning libs in ${JAR_FILENAME}..." + unzip -q ${JAR_PATH} -d ${OUTPUT_PATH} + find ${OUTPUT_PATH} -name '*.dylib' -exec codesign --force -s ${CODESIGN_IDENTITY} {} \; + find ${OUTPUT_PATH} -name '*.jnilib' -exec codesign --force -s ${CODESIGN_IDENTITY} {} \; + rm ${JAR_PATH} + pushd ${OUTPUT_PATH} > /dev/null + zip -qr ../${JAR_FILENAME} * + popd > /dev/null + rm -r ${OUTPUT_PATH} + fi + done + echo "Codesigning Cryptomator.app..." + codesign --force --deep --entitlements dist/mac/Cryptomator.entitlements -o runtime -s ${CODESIGN_IDENTITY} Cryptomator.app + - name: Clean up codesign certificate + if: ${{ always() }} + run: security delete-keychain $RUNNER_TEMP/codesign.keychain-db + - name: Create app.tar + run: tar -cvf app.tar Cryptomator.app + - name: Upload mac-app + uses: actions/upload-artifact@v2 + with: + name: mac-app + path: app.tar + if-no-files-found: error + +# +# macOS Cryptomator.dmg +# + mac-dmg: + name: Build Cryptomator.dmg + runs-on: macos-11 + needs: [mac-app, metadata] + steps: + - uses: actions/checkout@v2 + - name: Download mac-appdir + uses: actions/download-artifact@v2 + with: + name: mac-app + - name: Untar app.tar + run: tar -xvf app.tar + - name: Prepare .dmg contents + run: | + mkdir dmg + mv Cryptomator.app dmg + cp dist/mac/dmg/resources/macFUSE.webloc dmg + ls -l dmg + - name: Install create-dmg + run: | + brew install create-dmg + create-dmg --help + - name: Create .dmg + run: > + create-dmg + --volname Cryptomator + --volicon "dist/mac/dmg/resources/Cryptomator-Volume.icns" + --background "dist/mac/dmg/resources/Cryptomator-background.tiff" + --window-pos 400 100 + --window-size 640 694 + --icon-size 128 + --icon "Cryptomator.app" 128 245 + --hide-extension "Cryptomator.app" + --icon "macFUSE.webloc" 320 501 + --hide-extension "macFUSE.webloc" + --app-drop-link 512 245 + --eula "dist/mac/dmg/resources/license.rtf" + --icon ".background" 128 758 + --icon ".fseventsd" 320 758 + --icon ".VolumeIcon.icns" 512 758 + Cryptomator-${VERSION_NO}.dmg dmg + env: + VERSION_NO: ${{ needs.metadata.outputs.semVerNum }} + - name: Install notarization credentials + env: + NOTARIZATION_KEYCHAIN_PROFILE: ${{ secrets.MACOS_NOTARIZATION_KEYCHAIN_PROFILE }} + NOTARIZATION_APPLE_ID: ${{ secrets.MACOS_NOTARIZATION_APPLE_ID }} + NOTARIZATION_PW: ${{ secrets.MACOS_NOTARIZATION_PW }} + NOTARIZATION_TEAM_ID: ${{ secrets.MACOS_NOTARIZATION_TEAM_ID }} + NOTARIZATION_TMP_KEYCHAIN_PW: ${{ secrets.MACOS_NOTARIZATION_TMP_KEYCHAIN_PW }} + run: | + # create temporary keychain + KEYCHAIN_PATH=$RUNNER_TEMP/notarization.keychain-db + security create-keychain -p "${NOTARIZATION_TMP_KEYCHAIN_PW}" ${KEYCHAIN_PATH} + security set-keychain-settings -lut 900 ${KEYCHAIN_PATH} + security unlock-keychain -p "${NOTARIZATION_TMP_KEYCHAIN_PW}" ${KEYCHAIN_PATH} + + # import credentials from secrets + sudo xcode-select -s /Applications/Xcode_13.0.app + xcrun notarytool store-credentials "${NOTARIZATION_KEYCHAIN_PROFILE}" --apple-id "${NOTARIZATION_APPLE_ID}" --password "${NOTARIZATION_PW}" --team-id "${NOTARIZATION_TEAM_ID}" --keychain "${KEYCHAIN_PATH}" + - name: Notarize .dmg + env: + NOTARIZATION_KEYCHAIN_PROFILE: ${{ secrets.MACOS_NOTARIZATION_KEYCHAIN_PROFILE }} + run: | + KEYCHAIN_PATH=$RUNNER_TEMP/notarization.keychain-db + sudo xcode-select -s /Applications/Xcode_13.0.app + xcrun notarytool submit Cryptomator-*.dmg --keychain-profile "${NOTARIZATION_KEYCHAIN_PROFILE}" --keychain "${KEYCHAIN_PATH}" --wait + xcrun stapler staple Cryptomator-*.dmg + - name: Clean up notarization credentials + if: ${{ always() }} + run: security delete-keychain $RUNNER_TEMP/notarization.keychain-db + - name: Add possible alpha/beta tags to installer name + run: mv Cryptomator-*.dmg Cryptomator-${{ needs.metadata.outputs.semVerStr }}.dmg + - name: Upload mac-dmg + uses: actions/upload-artifact@v2 + with: + name: mac-dmg + path: Cryptomator-*.dmg + if-no-files-found: error + +# +# MSI package +# + win-msi: + name: Build Cryptomator.msi + runs-on: windows-latest + needs: [appdir, metadata] + steps: + - uses: actions/checkout@v2 + - name: Download win-appdir + uses: actions/download-artifact@v2 + with: + name: win-appdir + - name: Untar appdir.tar + run: tar -xvf appdir.tar + - uses: actions/setup-java@v1 + with: + java-version: ${{ env.JAVA_VERSION }} + - name: Patch Application Directory + run: | + cp dist/win/contrib/* appdir/Cryptomator + - name: Fix permissions + run: attrib -r appdir/Cryptomator/Cryptomator.exe + shell: pwsh + - name: Codesign + uses: skymatic/code-sign-action@v1 + with: + certificate: ${{ secrets.WIN_CODESIGN_P12_BASE64 }} + password: ${{ secrets.WIN_CODESIGN_P12_PW }} + certificatesha1: FF52240075AD7D14AF25629FDF69635357C7D14B + description: Cryptomator + timestampUrl: 'http://timestamp.digicert.com' + folder: appdir/Cryptomator + recursive: true + - name: Create MSI + run: > + ${JAVA_HOME}/bin/jpackage + --verbose + --type msi + --win-upgrade-uuid bda45523-42b1-4cae-9354-a45475ed4775 + --app-image appdir/Cryptomator + --dest installer + --name Cryptomator + --vendor "Skymatic GmbH" + --copyright "(C) 2016 - 2021 Skymatic GmbH" + --app-version "${{ needs.metadata.outputs.semVerNum }}" + --win-menu + --win-dir-chooser + --resource-dir dist/win/resources + --license-file dist/win/resources/license.rtf + --file-associations dist/win/resources/FAvaultFile.properties + env: + JP_WIXWIZARD_RESOURCES: ${{ github.workspace }}/dist/win/resources # requires abs path, used in resources/main.wxs + - name: Codesign MSI + uses: skymatic/code-sign-action@v1 + with: + certificate: ${{ secrets.WIN_CODESIGN_P12_BASE64 }} + password: ${{ secrets.WIN_CODESIGN_P12_PW }} + certificatesha1: FF52240075AD7D14AF25629FDF69635357C7D14B + description: Cryptomator Installer + timestampUrl: 'http://timestamp.digicert.com' + folder: installer + - name: Add possible alpha/beta tags to installer name + run: mv installer/Cryptomator-*.msi installer/Cryptomator-${{ needs.metadata.outputs.semVerStr }}.msi + - name: Upload win-msi + uses: actions/upload-artifact@v2 + with: + name: win-msi + path: installer/*.msi + if-no-files-found: error + +# +# Release +# + release: + name: Draft a release on Github + runs-on: ubuntu-latest + needs: [metadata,linux-appimage,mac-dmg,win-msi,ppa] + if: startsWith(github.ref, 'refs/tags/') && github.repository == 'cryptomator/cryptomator' + steps: + - uses: actions/checkout@v2 + - name: Create tarball + run: git archive --prefix="cryptomator-${{ needs.metadata.outputs.semVerStr }}/" -o "cryptomator-${{ needs.metadata.outputs.semVerStr }}.tar.gz" ${{ github.ref }} + - name: Download linux appimage + uses: actions/download-artifact@v2 + with: + name: linux-appimage + - name: Download macOS dmg + uses: actions/download-artifact@v2 + with: + name: mac-dmg + - name: Download Windows msi + uses: actions/download-artifact@v2 + with: + name: win-msi + - name: Create detached GPG signature for all release files with key 615D449FE6E6A235 + run: | + echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import + for FILE in `find . -name "*.AppImage" -o -name "*.dmg" -o -name "*.msi" -o -name "*.zsync" -o -name "*.tar.gz"`; do + echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --detach-sign -a ${FILE} + done + env: + GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} + GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }} + - name: Compute SHA256 checksums of release artifacts + run: | + SHA256_SUMS=`find . -name "*.AppImage" -o -name "*.dmg" -o -name "*.msi" -o -name "*.tar.gz" | xargs sha256sum` + echo "SHA256_SUMS<> $GITHUB_ENV + echo "${SHA256_SUMS}" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + continue-on-error: true + - name: Create release draft + uses: softprops/action-gh-release@v1 + with: + draft: true + fail_on_unmatched_files: true + discussion_category_name: releases + token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} + files: | + *.AppImage + *.zsync + *.asc + *.dmg + *.msi + body: | + :construction: Work in Progress + ## What's new + ## Bugfixes + ## Misc + --- + :scroll: A complete list of closed issues is available [here](LINK) + --- + :floppy_disk: SHA-256 checksums of release artifacts: + ``` + ${{ env.SHA256_SUMS }} + ``` diff --git a/.github/workflows/triageBugs.yml b/.github/workflows/triageBugs.yml deleted file mode 100644 index bcb0695b0..000000000 --- a/.github/workflows/triageBugs.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Bug Report Triage - -on: - issues: - types: [opened] - -jobs: - closeTemplateViolation: - name: Validate bug report against issue template - runs-on: ubuntu-latest - if: contains(github.event.issue.labels.*.name, 'type:bug') - steps: - - name: Check "Description" - if: | - !contains(github.event.issue.body, env.MUST_CONTAIN) - || contains(toJson(github.event.issue.body), env.MUST_NOT_CONTAIN) - run: exit 1 - env: - MUST_CONTAIN: '### Description' - MUST_NOT_CONTAIN: '### Description\r\n\r\n[Summarize your problem.]\r\n\r\n### System Setup' - - name: Check "Steps to Reproduce" - if: | - !contains(github.event.issue.body, env.MUST_CONTAIN) - || contains(toJson(github.event.issue.body), env.MUST_NOT_CONTAIN) - run: exit 1 - env: - MUST_CONTAIN: '### Steps to Reproduce' - MUST_NOT_CONTAIN: '### Steps to Reproduce\r\n\r\n1. [First step]\r\n2. [Second step]\r\n3. [and so on…]\r\n\r\n#### Expected Behavior' - - name: Close issue if one of the checks failed - if: ${{ failure() }} - uses: peter-evans/close-issue@v1 - with: - comment: | - This bug report did ignore our issue template. 😞 - Auto-closing this issue, since it is most likely not useful. - - _This decision was made by a bot. If you think the bot is wrong, let us know and we'll reopen this issue._ diff --git a/.gitignore b/.gitignore index d0e6b59a3..be67207df 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,9 @@ pom.xml.versionsBackup # IntelliJ Settings Files (https://intellij-support.jetbrains.com/hc/en-us/articles/206544839-How-to-manage-projects-under-Version-Control-Systems) # .idea/**/workspace.xml .idea/**/tasks.xml -.idea/dictionaries +.idea/**/shelf +.idea/dictionaries/** +!.idea/dictionaries/dict_* .idea/compiler.xml .idea/encodings.xml .idea/jarRepositories.xml diff --git a/.idea/dictionaries/dict_de.xml b/.idea/dictionaries/dict_de.xml new file mode 100644 index 000000000..a6ecf3c80 --- /dev/null +++ b/.idea/dictionaries/dict_de.xml @@ -0,0 +1,15 @@ + + + + tresorinhalt + tresorkonfigurationsdatei + tresorlaufwerk + tresorliste + tresorname + tresoroptionen + tresorstatistik + ungespeicherten + ungespeicherter + + + \ No newline at end of file diff --git a/.idea/dictionaries/dict_project.xml b/.idea/dictionaries/dict_project.xml new file mode 100644 index 000000000..5649810c7 --- /dev/null +++ b/.idea/dictionaries/dict_project.xml @@ -0,0 +1,106 @@ + + + + addvault + addvaultwizard + adoptopenjdk + affero + aquafx + autolock + autolocked + autolocking + baos + bkup + buildkit + changepassword + checkerframework + crit + crowdin + cryptofs + cryptomator + cryptomator's + cryptor + csprng + dcryptomator + dfuse + dirid + djdk + dokany + dragboard + easybind + encr + errorprone + failureaccess + fbidis + fldinst + fldrslt + fontawesomefx + gdrive + gvfs + hmmss + httpcomponents + httpcore + iclouddrive + jensd + jffi + keyloading + kibs + listcell + listenablefuture + lopp + mainwindow + masterkey + masterkeyfile + mibs + mountpath + mpc's + needsmigration + noncommercially + noël + nulab + oatomic + oauto + objectgraph + odefault + ogid + onoappledouble + ordonly + ouid + ovolname + passthrough + patreon + pcloud + probot + recoverykey + relicensing + removevault + revealer + serceman + setolabs + skymatic + socio + spof + stenzel + styleclass + sublicenses + sublicensing + systemkeychain + tada + tidelift + tmpmountpoint + tobiasdiez + toggler + traymenu + unknownerror + unlockable + vaultconfig + vaultlist + vaultname + vaultoptions + wrongfilealert + xattr + zillmann + zxcvbn + + + \ No newline at end of file diff --git a/.idea/icon.svg b/.idea/icon.svg new file mode 100644 index 000000000..53e7c879a --- /dev/null +++ b/.idea/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 146ab09b7..0634be039 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -1,7 +1,7 @@