Skip to content

Commit 952c5fa

Browse files
committed
Merge branch 'release/1.0.0'
2 parents fee3a18 + c37beec commit 952c5fa

File tree

44 files changed

+278
-63
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+278
-63
lines changed

.crowdin.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
commit_message: '[ci skip]'
2+
files:
3+
- source: /src/main/resources/MacIntegrationsBundle.properties
4+
translation: /src/main/resources/MacIntegrationsBundle_%two_letters_code%.properties
5+
escape_quotes: 0
6+
escape_special_characters: 0
7+
skip_untranslated_files: true
8+
skip_untranslated_strings: true

.github/workflows/build.yml

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,40 @@
11
name: Build
2-
32
on:
43
[push]
5-
64
jobs:
75
build:
86
name: Build and Test
97
runs-on: macos-latest
108
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
11-
env:
12-
BUILD_VERSION: SNAPSHOT
13-
outputs:
14-
artifact-version: ${{ steps.setversion.outputs.version }}
159
steps:
1610
- uses: actions/checkout@v2
1711
- uses: actions/setup-java@v1
1812
with:
1913
java-version: 11
20-
server-id: bintray-jcenter
21-
server-username: BINTRAY_USERNAME
22-
server-password: BINTRAY_API_KEY
23-
- uses: actions/cache@v1
14+
- uses: actions/cache@v2
2415
with:
2516
path: ~/.m2/repository
2617
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
2718
restore-keys: |
2819
${{ runner.os }}-maven-
2920
- name: Ensure to use tagged version
30-
run: mvn versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
3121
if: startsWith(github.ref, 'refs/tags/')
32-
- name: Export the project version to the job environment and fix it as an ouput of this job
33-
id: setversion
34-
run: |
35-
v=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout)
36-
echo "BUILD_VERSION=${v}" >> $GITHUB_ENV
37-
echo "::set-output name=version::${v}"
3822
shell: bash
23+
run: |
24+
mvn versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
3925
- name: Build and Test
40-
run: mvn -B install
41-
- name: Upload .jars
42-
uses: actions/upload-artifact@v2
26+
id: buildAndTest
27+
run: mvn -B clean install
28+
- uses: actions/upload-artifact@v2
4329
with:
44-
name: integrations-mac-${{ env.BUILD_VERSION }}
45-
path: target/integrations-mac-*.jar
46-
- name: Build and deploy to jcenter
30+
name: artifacts
31+
path: target/*.jar
32+
- name: Create Release
33+
uses: actions/create-release@v1
4734
if: startsWith(github.ref, 'refs/tags/')
48-
run: mvn -B deploy -DskipTests
4935
env:
50-
BINTRAY_USERNAME: cryptobot
51-
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
36+
GITHUB_TOKEN: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} # release as "cryptobot"
37+
with:
38+
tag_name: ${{ github.ref }}
39+
release_name: Release ${{ github.ref }}
40+
prerelease: true
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
name: "CodeQL"
3+
4+
on:
5+
push:
6+
branches: [develop, main]
7+
pull_request:
8+
branches: [develop]
9+
schedule:
10+
- cron: '0 8 * * 0'
11+
12+
jobs:
13+
analyse:
14+
name: Analyse
15+
runs-on: macos-latest
16+
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 2
21+
- uses: actions/setup-java@v1
22+
with:
23+
java-version: 11
24+
- uses: actions/cache@v2
25+
with:
26+
path: ~/.m2/repository
27+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
28+
restore-keys: |
29+
${{ runner.os }}-maven-
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v1
32+
with:
33+
languages: java
34+
- name: Build
35+
run: mvn -B compile
36+
- name: Perform CodeQL Analysis
37+
uses: github/codeql-action/analyze@v1
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish to Maven Central
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
tag:
6+
description: 'Tag'
7+
required: true
8+
default: '0.0.0'
9+
jobs:
10+
publish:
11+
runs-on: macos-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
ref: "refs/tags/${{ github.event.inputs.tag }}"
16+
- uses: actions/setup-java@v1
17+
with:
18+
java-version: 11
19+
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
20+
server-username: MAVEN_USERNAME # env variable for username in deploy
21+
server-password: MAVEN_PASSWORD # env variable for token in deploy
22+
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
23+
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
24+
- uses: actions/cache@v2
25+
with:
26+
path: ~/.m2/repository
27+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
28+
restore-keys: |
29+
${{ runner.os }}-maven-
30+
- name: Enforce project version ${{ github.event.inputs.tag }}
31+
run: mvn versions:set -B -DnewVersion=${{ github.event.inputs.tag }}
32+
- name: Deploy
33+
run: mvn deploy -B -DskipTests -Psign,deploy-central --no-transfer-progress
34+
env:
35+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
36+
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
37+
MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish to GitHub Packages
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
publish:
7+
runs-on: macos-latest
8+
if: startsWith(github.ref, 'refs/tags/') # only allow publishing tagged versions
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-java@v1
12+
with:
13+
java-version: 11
14+
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
15+
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
16+
- uses: actions/cache@v2
17+
with:
18+
path: ~/.m2/repository
19+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
20+
restore-keys: |
21+
${{ runner.os }}-maven-
22+
- name: Enforce project version ${{ github.event.release.tag_name }}
23+
run: mvn versions:set -B -DnewVersion=${{ github.event.release.tag_name }}
24+
- name: Deploy
25+
run: mvn deploy -B -DskipTests -Psign,deploy-github --no-transfer-progress
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}

pom.xml

Lines changed: 80 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>org.cryptomator</groupId>
77
<artifactId>integrations-mac</artifactId>
8-
<version>0.1.0</version>
8+
<version>1.0.0</version>
99

1010
<name>Cryptomator Integrations for macOS</name>
1111
<description>Provides optional macOS services used by Cryptomator</description>
@@ -29,14 +29,14 @@
2929
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3030

3131
<!-- runtime dependencies -->
32-
<api.version>0.1.6</api.version>
33-
<slf4j.version>1.7.30</slf4j.version>
34-
<guava.version>30.0-jre</guava.version>
35-
<gson.version>2.8.6</gson.version>
32+
<api.version>1.0.0</api.version>
33+
<slf4j.version>1.7.32</slf4j.version>
34+
<guava.version>31.0-jre</guava.version>
35+
<gson.version>2.8.8</gson.version>
3636

3737
<!-- test dependencies -->
38-
<junit.jupiter.version>5.6.2</junit.jupiter.version>
39-
<mockito.version>3.3.3</mockito.version>
38+
<junit.jupiter.version>5.8.1</junit.jupiter.version>
39+
<mockito.version>3.12.4</mockito.version>
4040
</properties>
4141

4242
<licenses>
@@ -47,21 +47,6 @@
4747
</license>
4848
</licenses>
4949

50-
<repositories>
51-
<repository>
52-
<id>bintray</id>
53-
<name>bintray</name>
54-
<url>https://jcenter.bintray.com</url>
55-
</repository>
56-
</repositories>
57-
58-
<distributionManagement>
59-
<repository>
60-
<id>bintray-jcenter</id>
61-
<url>https://api.bintray.com/maven/cryptomator/maven/integrations-mac/;publish=1</url>
62-
</repository>
63-
</distributionManagement>
64-
6550
<dependencies>
6651
<dependency>
6752
<groupId>org.cryptomator</groupId>
@@ -126,7 +111,7 @@
126111
<plugin>
127112
<groupId>org.apache.maven.plugins</groupId>
128113
<artifactId>maven-compiler-plugin</artifactId>
129-
<version>3.8.0</version>
114+
<version>3.8.1</version>
130115
<configuration>
131116
<compilerArgs>
132117
<arg>-h</arg>
@@ -138,7 +123,7 @@
138123
<plugin>
139124
<groupId>org.apache.maven.plugins</groupId>
140125
<artifactId>maven-enforcer-plugin</artifactId>
141-
<version>3.0.0-M3</version>
126+
<version>3.0.0</version>
142127
<executions>
143128
<execution>
144129
<id>check-preconditions</id>
@@ -167,7 +152,7 @@
167152
<plugin>
168153
<groupId>org.codehaus.mojo</groupId>
169154
<artifactId>exec-maven-plugin</artifactId>
170-
<version>1.6.0</version>
155+
<version>3.0.0</version>
171156
<executions>
172157
<execution>
173158
<goals>
@@ -189,7 +174,7 @@
189174
<argument>-quiet</argument>
190175
<argument>clean</argument>
191176
<argument>archive</argument>
192-
<argument>USER_HEADER_SEARCH_PATHS="${project.basedir}/src/main/headers/ ${java.home}/include/**"</argument>
177+
<argument>JAVA_HOME="${java.home}"</argument>
193178
</arguments>
194179
</configuration>
195180
</execution>
@@ -221,11 +206,11 @@
221206
<plugin>
222207
<groupId>org.apache.maven.plugins</groupId>
223208
<artifactId>maven-surefire-plugin</artifactId>
224-
<version>2.22.2</version>
209+
<version>3.0.0-M5</version>
225210
</plugin>
226211
<plugin>
227212
<artifactId>maven-source-plugin</artifactId>
228-
<version>3.2.0</version>
213+
<version>3.2.1</version>
229214
<executions>
230215
<execution>
231216
<id>attach-sources</id>
@@ -237,7 +222,7 @@
237222
</plugin>
238223
<plugin>
239224
<artifactId>maven-javadoc-plugin</artifactId>
240-
<version>3.2.0</version>
225+
<version>3.3.1</version>
241226
<executions>
242227
<execution>
243228
<id>attach-javadocs</id>
@@ -292,4 +277,70 @@
292277
</plugin>
293278
</plugins>
294279
</build>
280+
281+
<profiles>
282+
<profile>
283+
<id>sign</id>
284+
<build>
285+
<plugins>
286+
<plugin>
287+
<artifactId>maven-gpg-plugin</artifactId>
288+
<version>3.0.1</version>
289+
<executions>
290+
<execution>
291+
<id>sign-artifacts</id>
292+
<phase>verify</phase>
293+
<goals>
294+
<goal>sign</goal>
295+
</goals>
296+
<configuration>
297+
<gpgArguments>
298+
<arg>--pinentry-mode</arg>
299+
<arg>loopback</arg>
300+
</gpgArguments>
301+
</configuration>
302+
</execution>
303+
</executions>
304+
</plugin>
305+
</plugins>
306+
</build>
307+
</profile>
308+
309+
<profile>
310+
<id>deploy-central</id>
311+
<distributionManagement>
312+
<repository>
313+
<id>ossrh</id>
314+
<name>Maven Central</name>
315+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
316+
</repository>
317+
</distributionManagement>
318+
<build>
319+
<plugins>
320+
<plugin>
321+
<groupId>org.sonatype.plugins</groupId>
322+
<artifactId>nexus-staging-maven-plugin</artifactId>
323+
<version>1.6.8</version>
324+
<extensions>true</extensions>
325+
<configuration>
326+
<serverId>ossrh</serverId>
327+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
328+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
329+
</configuration>
330+
</plugin>
331+
</plugins>
332+
</build>
333+
</profile>
334+
335+
<profile>
336+
<id>deploy-github</id>
337+
<distributionManagement>
338+
<repository>
339+
<id>github</id>
340+
<name>GitHub Packages</name>
341+
<url>https://maven.pkg.github.com/cryptomator/integrations-mac</url>
342+
</repository>
343+
</distributionManagement>
344+
</profile>
345+
</profiles>
295346
</project>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package org.cryptomator.macos.common;
2+
3+
import java.util.ResourceBundle;
4+
5+
public enum Localization {
6+
INSTANCE;
7+
8+
private final ResourceBundle resourceBundle = ResourceBundle.getBundle("MacIntegrationsBundle");
9+
10+
public static ResourceBundle get() {
11+
return INSTANCE.resourceBundle;
12+
}
13+
14+
}

0 commit comments

Comments
 (0)