diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index aab954476..ce23bac60 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -4,6 +4,10 @@ on: release: types: [published] workflow_dispatch: + inputs: + version: + description: 'Version' + required: false env: JAVA_VERSION: 17 @@ -28,6 +32,9 @@ jobs: if [[ $GITHUB_REF =~ refs/tags/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then SEM_VER_STR=${GITHUB_REF##*/} mvn versions:set -DnewVersion=${SEM_VER_STR} + elif [[ "${{ github.event.inputs.version }}" =~ [0-9]+\.[0-9]+\.[0-9]+.* ]]; then + SEM_VER_STR="${{ github.event.inputs.version }}" + mvn versions:set -DnewVersion=${SEM_VER_STR} else SEM_VER_STR=`mvn help:evaluate -Dexpression=project.version -q -DforceStdout` fi diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 97d46ae9e..5270365b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,13 +43,15 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - 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) + - name: Sign source tarball with key 615D449FE6E6A235 + if: startsWith(github.ref, 'refs/tags/') + run: | + git archive --prefix="cryptomator-${{ github.ref_name }}/" -o "cryptomator-${{ github.ref_name }}.tar.gz" ${{ github.ref }} + echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import + echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --detach-sign -a cryptomator-*.tar.gz env: - CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} - continue-on-error: true + GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} + GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }} - name: Draft a release if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v1 @@ -58,6 +60,9 @@ jobs: discussion_category_name: releases token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} generate_release_notes: true + files: | + cryptomator-*.tar.gz.asc + fail_on_unmatched_files: true body: |- :construction: Work in Progress diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml index f7893bbaa..fb8b3a423 100644 --- a/.github/workflows/debian.yml +++ b/.github/workflows/debian.yml @@ -10,6 +10,9 @@ on: required: true default: false type: boolean + version: + description: 'Version' + required: false env: JAVA_VERSION: 17 @@ -38,6 +41,9 @@ jobs: if [[ $GITHUB_REF =~ refs/tags/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then SEM_VER_STR=${GITHUB_REF##*/} mvn versions:set -DnewVersion=${SEM_VER_STR} + elif [[ "${{ github.event.inputs.version }}" =~ [0-9]+\.[0-9]+\.[0-9]+.* ]]; then + SEM_VER_STR="${{ github.event.inputs.version }}" + mvn versions:set -DnewVersion=${SEM_VER_STR} else SEM_VER_STR=`mvn help:evaluate -Dexpression=project.version -q -DforceStdout` fi diff --git a/.github/workflows/mac-dmg.yml b/.github/workflows/mac-dmg.yml index 66af92d6d..3e1e6ceac 100644 --- a/.github/workflows/mac-dmg.yml +++ b/.github/workflows/mac-dmg.yml @@ -4,6 +4,10 @@ on: release: types: [published] workflow_dispatch: + inputs: + version: + description: 'Version' + required: false env: JAVA_VERSION: 17 @@ -28,6 +32,9 @@ jobs: if [[ $GITHUB_REF =~ refs/tags/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then SEM_VER_STR=${GITHUB_REF##*/} mvn versions:set -DnewVersion=${SEM_VER_STR} + elif [[ "${{ github.event.inputs.version }}" =~ [0-9]+\.[0-9]+\.[0-9]+.* ]]; then + SEM_VER_STR="${{ github.event.inputs.version }}" + mvn versions:set -DnewVersion=${SEM_VER_STR} else SEM_VER_STR=`mvn help:evaluate -Dexpression=project.version -q -DforceStdout` fi diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index c529ca09b..79a0d5a21 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -23,4 +23,4 @@ jobs: 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 + run: xvfb-run mvn -B clean install jacoco:report -Pcoverage,dependency-check \ No newline at end of file diff --git a/.github/workflows/win-exe.yml b/.github/workflows/win-exe.yml index 25a0575fb..5b1ba1aaf 100644 --- a/.github/workflows/win-exe.yml +++ b/.github/workflows/win-exe.yml @@ -4,6 +4,10 @@ on: release: types: [published] workflow_dispatch: + inputs: + version: + description: 'Version' + required: false env: JAVA_VERSION: 17 @@ -33,6 +37,9 @@ jobs: if [[ $GITHUB_REF =~ refs/tags/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then SEM_VER_STR=${GITHUB_REF##*/} mvn versions:set -DnewVersion=${SEM_VER_STR} + elif [[ "${{ github.event.inputs.version }}" =~ [0-9]+\.[0-9]+\.[0-9]+.* ]]; then + SEM_VER_STR="${{ github.event.inputs.version }}" + mvn versions:set -DnewVersion=${SEM_VER_STR} else SEM_VER_STR=`mvn help:evaluate -Dexpression=project.version -q -DforceStdout` fi @@ -80,6 +87,7 @@ jobs: --app-version "${{ steps.versions.outputs.semVerNum }}.${{ steps.versions.outputs.revNum }}" --java-options "-Xss5m" --java-options "-Xmx256m" + --java-options "-Dcryptomator.appVersion=\"${{ steps.versions.outputs.semVerStr }}\"" --java-options "-Dfile.encoding=\"utf-8\"" --java-options "-Dcryptomator.logDir=\"~/AppData/Roaming/Cryptomator\"" --java-options "-Dcryptomator.pluginDir=\"~/AppData/Roaming/Cryptomator/Plugins\"" @@ -217,11 +225,11 @@ jobs: run: > "${WIX}/bin/light.exe" -b dist/win/ dist/win/bundle/bundleWithWinfsp.wixobj -ext WixBalExtension - -out installer/unsigned/Cryptomator.exe + -out installer/unsigned/Cryptomator-Installer.exe - name: Detach burn engine in preparation to sign run: > "${WIX}/bin/insignia.exe" - -ib installer/unsigned/Cryptomator.exe + -ib installer/unsigned/Cryptomator-Installer.exe -o tmp/engine.exe - name: Codesign burn engine uses: skymatic/code-sign-action@v1 @@ -235,8 +243,8 @@ jobs: - name: Reattach signed burn engine to installer run : > "${WIX}/bin/insignia.exe" - -ab tmp/engine.exe installer/unsigned/Cryptomator.exe - -o installer/Cryptomator.exe + -ab tmp/engine.exe installer/unsigned/Cryptomator-Installer.exe + -o installer/Cryptomator-Installer.exe - name: Codesign EXE uses: skymatic/code-sign-action@v1 with: @@ -247,7 +255,7 @@ jobs: timestampUrl: 'http://timestamp.digicert.com' folder: installer - name: Add possible alpha/beta tags to installer name - run: mv installer/Cryptomator.exe Cryptomator-${{ needs.build-msi.outputs.semVerStr }}-x64.exe + run: mv installer/Cryptomator-Installer.exe Cryptomator-${{ needs.build-msi.outputs.semVerStr }}-x64.exe - name: Create detached GPG signature with key 615D449FE6E6A235 run: | echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import @@ -271,4 +279,44 @@ jobs: token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} files: | Cryptomator-*.exe - Cryptomator-*.asc \ No newline at end of file + Cryptomator-*.asc + + allowlist: + name: Anti Virus Allowlisting + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + needs: [build-msi, build-exe] + steps: + - name: Download .msi + uses: actions/download-artifact@v2 + with: + name: msi + path: msi + - name: Download .exe + uses: actions/download-artifact@v2 + with: + name: exe + path: exe + - name: Collect files + run: | + mkdir files + cp msi/*.msi files + cp exe/*.exe files + - name: Upload to Kaspersky + uses: SamKirkland/FTP-Deploy-Action@4.3.0 + with: + protocol: ftps + server: allowlist.kaspersky-labs.com + port: 990 + username: ${{ secrets.ALLOWLIST_KASPERSKY_USERNAME }} + password: ${{ secrets.ALLOWLIST_KASPERSKY_PASSWORD }} + local-dir: files/ + - name: Upload to Avast + uses: SamKirkland/FTP-Deploy-Action@4.3.0 + with: + protocol: ftp + server: whitelisting.avast.com + port: 21 + username: ${{ secrets.ALLOWLIST_AVAST_USERNAME }} + password: ${{ secrets.ALLOWLIST_AVAST_PASSWORD }} + local-dir: files/ diff --git a/.idea/runConfigurations/Cryptomator_Windows_Dev.xml b/.idea/runConfigurations/Cryptomator_Windows_Dev.xml index 62ab38666..b4b844cae 100644 --- a/.idea/runConfigurations/Cryptomator_Windows_Dev.xml +++ b/.idea/runConfigurations/Cryptomator_Windows_Dev.xml @@ -2,7 +2,7 @@