Skip to content

Commit a220315

Browse files
committed
Merge branch 'develop' into release/2.10.0
2 parents 67190a6 + ee3011a commit a220315

30 files changed

+970
-195
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ updates:
77
day: "monday"
88
time: "06:00"
99
timezone: "Etc/UTC"
10+
ignore:
11+
# due to https://github.com/fabriciorby/maven-surefire-junit5-tree-reporter/issues/68
12+
- dependency-name: "org.apache.maven.plugins:maven-surefire-plugin"
13+
versions: ["3.5.4", "3.5.5"]
1014
groups:
1115
java-test-dependencies:
1216
patterns:

.github/workflows/build.yml

Lines changed: 115 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Build
2-
32
on:
43
push:
54
pull_request_target:
@@ -13,18 +12,21 @@ jobs:
1312
name: Build and Test
1413
runs-on: ubuntu-latest
1514
permissions:
16-
id-token: write # Required for the attestations step
15+
contents: read
16+
id-token: write # OIDC token for the attestations step
1717
attestations: write # Required for the attestations step
18-
contents: write # Required for the release step
18+
artifact-metadata: write # Required for the attestations step
19+
outputs:
20+
sha256: ${{ steps.checksums.outputs.sha256 }}
1921
steps:
2022
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2123
with:
22-
fetch-depth: 0
23-
show-progress: false
24+
fetch-depth: 0 # deep fetch for better sonarcloud analysis
25+
show-progress: false
2426
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
2527
with:
26-
java-version: ${{ env.JAVA_VERSION }}
2728
distribution: 'temurin'
29+
java-version: ${{ env.JAVA_VERSION }}
2830
cache: 'maven'
2931
- name: Cache SonarCloud packages
3032
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
@@ -34,10 +36,10 @@ jobs:
3436
restore-keys: ${{ runner.os }}-sonar
3537
- name: Ensure to use tagged version
3638
if: startsWith(github.ref, 'refs/tags/')
37-
run: mvn -B versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
39+
run: ./mvnw versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
3840
- name: Build and Test
3941
run: >
40-
mvn -B verify
42+
./mvnw -B verify --no-transfer-progress
4143
jacoco:report
4244
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
4345
-Pcoverage
@@ -47,23 +49,123 @@ jobs:
4749
env:
4850
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
4951
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
52+
- name: Calculate Checksums
53+
id: checksums
54+
run: |
55+
{
56+
echo 'sha256<<EOF'
57+
shasum -a256 target/*.jar
58+
echo EOF
59+
} >> $GITHUB_OUTPUT
5060
- name: Attest
5161
if: startsWith(github.ref, 'refs/tags/')
52-
uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
62+
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
5363
with:
5464
subject-path: |
5565
target/*.jar
5666
target/*.pom
57-
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
67+
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
5868
with:
5969
name: artifacts
60-
path: target/*.jar
61-
- name: Create Release
70+
path: |
71+
target/*.jar
72+
73+
74+
deploy-central:
75+
name: Deploy to Maven Central
76+
runs-on: ubuntu-latest
77+
permissions:
78+
id-token: write # OIDC token for sigstore signing
79+
contents: read # Required for sigstore signing
80+
needs: [build]
81+
if: github.repository_owner == 'cryptomator' && (startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message, '[deploy]'))
82+
steps:
83+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
84+
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
85+
with:
86+
distribution: 'temurin'
87+
java-version: ${{ env.JAVA_VERSION }}
88+
cache: 'maven'
89+
server-id: central
90+
server-username: MAVEN_CENTRAL_USERNAME
91+
server-password: MAVEN_CENTRAL_PASSWORD
92+
- name: Enforce to use tagged version
6293
if: startsWith(github.ref, 'refs/tags/')
94+
run: ./mvnw versions:set -B -DnewVersion="${GITHUB_REF##*/}"
95+
- name: Verify project version is -SNAPSHOT
96+
if: startsWith(github.ref, 'refs/tags/') == false
97+
run: |
98+
PROJECT_VERSION=$(./mvnw help:evaluate "-Dexpression=project.version" -q -DforceStdout)
99+
test "${PROJECT_VERSION: -9}" = "-SNAPSHOT"
100+
- name: Deploy to Maven Central
101+
run: ./mvnw deploy -B -DskipTests -Psign,deploy-central --no-transfer-progress
102+
env:
103+
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
104+
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
105+
MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
106+
MAVEN_GPG_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
107+
MAVEN_GPG_KEY_FINGERPRINT: ${{ vars.RELEASES_GPG_KEY_FINGERPRINT }}
108+
109+
deploy-github:
110+
name: Deploy to GitHub Packages
111+
runs-on: ubuntu-latest
112+
permissions:
113+
packages: write # Required for the deploy to GitHub Packages step
114+
id-token: write # OIDC token for sigstore signing
115+
contents: read # Required for sigstore signing
116+
needs: [build]
117+
if: github.repository_owner == 'cryptomator' && (startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message, '[deploy]'))
118+
steps:
119+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
120+
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
121+
with:
122+
java-version: ${{ env.JAVA_VERSION }}
123+
distribution: 'temurin'
124+
cache: 'maven'
125+
- name: Enforce to use tagged version
126+
if: startsWith(github.ref, 'refs/tags/')
127+
run: ./mvnw versions:set -B -DnewVersion="${GITHUB_REF##*/}"
128+
- name: Verify project version is -SNAPSHOT
129+
if: startsWith(github.ref, 'refs/tags/') == false
130+
run: |
131+
PROJECT_VERSION=$(./mvnw help:evaluate "-Dexpression=project.version" -q -DforceStdout)
132+
test "${PROJECT_VERSION: -9}" = "-SNAPSHOT"
133+
- name: Deploy to GitHub Packages
134+
run: ./mvnw deploy -B -DskipTests -Psign,deploy-github --no-transfer-progress
135+
env:
136+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
137+
MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
138+
MAVEN_GPG_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
139+
MAVEN_GPG_KEY_FINGERPRINT: ${{ vars.RELEASES_GPG_KEY_FINGERPRINT }}
140+
141+
release:
142+
name: Release
143+
runs-on: ubuntu-latest
144+
permissions:
145+
contents: write # Required for the release step
146+
needs: [build, deploy-central, deploy-github]
147+
if: startsWith(github.ref, 'refs/tags/')
148+
steps:
149+
- name: Create Release
63150
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
64151
with:
65152
prerelease: true
66153
token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }}
67154
generate_release_notes: true
68-
body: |
155+
body: |-
156+
### Changelog
69157
For a list of all notable changes, read the [changelog](/CHANGELOG.md).
158+
159+
### Maven Coordinates
160+
```xml
161+
<dependency>
162+
<groupId>org.cryptomator</groupId>
163+
<artifactId>cryptofs</artifactId>
164+
<version>${{ github.ref_name }}</version>
165+
</dependency>
166+
```
167+
168+
### Artifact Checksums
169+
```txt
170+
${{ needs.build.outputs.sha256 }}
171+
```

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
distribution: 'temurin'
2727
cache: 'maven'
2828
- name: Initialize CodeQL
29-
uses: github/codeql-action/init@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v4.32.0
29+
uses: github/codeql-action/init@c793b717bc78562f491db7b0e93a3a178b099162 # v4.32.5
3030
with:
3131
languages: java
3232
- name: Build
33-
run: mvn -B install -DskipTests
33+
run: ./mvnw -B install -DskipTests
3434
- name: Perform CodeQL Analysis
35-
uses: github/codeql-action/analyze@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v4.32.0
35+
uses: github/codeql-action/analyze@c793b717bc78562f491db7b0e93a3a178b099162 # v4.32.5

.github/workflows/publish-central.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/publish-github.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
wrapperVersion=3.3.4
2+
distributionType=only-script
3+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip
4+
distributionSha256Sum=305773a68d6ddfd413df58c82b3f8050e89778e777f3a745c8e5b8cbea4018ef

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

77
The changelog starts with version 2.10.0.
8-
Changes to prior versions can be found on the [Github release page](https://github.com/cryptomator/cryptofs/releases).
8+
Changes to prior versions can be found on the [GitHub release page](https://github.com/cryptomator/cryptofs/releases).
99

1010
## [2.10.0](https://github.com/cryptomator/cryptofs/compare/2.9.0...HEAD) - tbd
1111

1212
### Added
13-
* Files-in-Use: Optional feature to indicate for external parties if an encrypted file is currently opened by this filesystem ([#312](https://github.com/cryptomator/cryptofs/pull/312))
13+
* Files-in-Use: Optional feature to indicate for external parties if an encrypted file is currently opened by this filesystem ([#312](https://github.com/cryptomator/cryptofs/pull/312), [#338](https://github.com/cryptomator/cryptofs/pull/338))
1414
* Changelog file
1515

1616
### Changed
1717
* Use JDK 25 for build (bf26d6c9cd15a2489126ee0409a8ec9eca59da0c)
1818
* Pin external ci actions ([#320](https://github.com/cryptomator/cryptofs/pull/320))
19+
* Use Maven wrapper ([#341](https://github.com/cryptomator/cryptofs/pull/341))
1920
* Updated dependencies:
2021
* `com.github.ben-manes.caffeine:caffeine` from 3.2.0 to 3.2.3 ([#323](https://github.com/cryptomator/cryptofs/pull/323))
2122
* `org.cryptomator:cryptolib` from 2.2.1 to 2.2.2

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,12 @@ For more details on how to use the constructed `FileSystem`, you may consult the
9797

9898
## Building
9999

100-
### Dependencies
101-
102-
* Java 25
103-
* Maven 3
104-
105-
### Run Maven
100+
Required dependencies
101+
* JDK 25
106102

103+
To build the project, run
107104
```bash
108-
mvn clean install
105+
./mvnw clean install
109106
```
110107

111108
## Contributing to CryptoFS

0 commit comments

Comments
 (0)