Skip to content

Commit eafc865

Browse files
committed
Merge branch 'release/1.0.0'
2 parents de36913 + 2cf801c commit eafc865

File tree

7 files changed

+270
-87
lines changed

7 files changed

+270
-87
lines changed

.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: ubuntu-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-linux-${{ env.BUILD_VERSION }}
45-
path: target/integrations-linux-*.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

.github/workflows/codeql-analysis.yml

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: ubuntu-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

.github/workflows/publish-central.yml

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: ubuntu-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 }}

.github/workflows/publish-github.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish to GitHub Packages
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-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 }}
29+
- name: Slack Notification
30+
uses: rtCamp/action-slack-notify@v2
31+
env:
32+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
33+
SLACK_USERNAME: 'Cryptobot'
34+
SLACK_ICON:
35+
SLACK_ICON_EMOJI: ':bot:'
36+
SLACK_CHANNEL: 'cryptomator-desktop'
37+
SLACK_TITLE: "Published ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}"
38+
SLACK_MESSAGE: "Ready to <https://github.com/${{ github.repository }}/actions/workflows/publish-central.yml|deploy to Maven Central>."
39+
SLACK_FOOTER:
40+
MSG_MINIMAL: true

pom.xml

Lines changed: 81 additions & 27 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-linux</artifactId>
8-
<version>0.1.1</version>
8+
<version>1.0.0</version>
99

1010
<name>integrations-linux</name>
1111
<description>Provides optional Linux services used by Cryptomator</description>
@@ -38,28 +38,15 @@
3838
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3939

4040
<!-- runtime dependencies -->
41-
<api.version>0.1.3</api.version>
42-
<secret-service.version>1.2.1</secret-service.version>
43-
<kdewallet.version>1.1.1</kdewallet.version>
44-
<guava.version>30.0-jre</guava.version>
45-
<slf4j.version>1.7.30</slf4j.version>
46-
<junit.version>5.7.0</junit.version>
47-
</properties>
48-
49-
<repositories>
50-
<repository>
51-
<id>bintray</id>
52-
<name>bintray</name>
53-
<url>https://jcenter.bintray.com</url>
54-
</repository>
55-
</repositories>
41+
<api.version>1.0.0</api.version>
42+
<secret-service.version>1.7.0</secret-service.version>
43+
<kdewallet.version>1.2.3</kdewallet.version>
44+
<guava.version>31.0-jre</guava.version>
45+
<slf4j.version>1.7.32</slf4j.version>
5646

57-
<distributionManagement>
58-
<repository>
59-
<id>bintray-jcenter</id>
60-
<url>https://api.bintray.com/maven/cryptomator/maven/integrations-linux/;publish=1</url>
61-
</repository>
62-
</distributionManagement>
47+
<!-- test dependencies -->
48+
<junit.version>5.8.1</junit.version>
49+
</properties>
6350

6451
<dependencies>
6552
<dependency>
@@ -101,20 +88,20 @@
10188
<plugin>
10289
<groupId>org.apache.maven.plugins</groupId>
10390
<artifactId>maven-compiler-plugin</artifactId>
104-
<version>3.8.0</version>
91+
<version>3.8.1</version>
10592
<configuration>
10693
<release>11</release>
10794
</configuration>
10895
</plugin>
10996
<plugin>
11097
<groupId>org.apache.maven.plugins</groupId>
11198
<artifactId>maven-surefire-plugin</artifactId>
112-
<version>2.22.2</version>
99+
<version>3.0.0-M5</version>
113100
</plugin>
114101
<plugin>
115102
<groupId>org.apache.maven.plugins</groupId>
116103
<artifactId>maven-enforcer-plugin</artifactId>
117-
<version>3.0.0-M3</version>
104+
<version>3.0.0</version>
118105
<executions>
119106
<execution>
120107
<id>check-preconditions</id>
@@ -135,7 +122,7 @@
135122
</plugin>
136123
<plugin>
137124
<artifactId>maven-source-plugin</artifactId>
138-
<version>3.2.0</version>
125+
<version>3.2.1</version>
139126
<executions>
140127
<execution>
141128
<id>attach-sources</id>
@@ -147,7 +134,7 @@
147134
</plugin>
148135
<plugin>
149136
<artifactId>maven-javadoc-plugin</artifactId>
150-
<version>3.2.0</version>
137+
<version>3.3.1</version>
151138
<executions>
152139
<execution>
153140
<id>attach-javadocs</id>
@@ -202,4 +189,71 @@
202189
</plugin>
203190
</plugins>
204191
</build>
192+
193+
194+
<profiles>
195+
<profile>
196+
<id>sign</id>
197+
<build>
198+
<plugins>
199+
<plugin>
200+
<artifactId>maven-gpg-plugin</artifactId>
201+
<version>3.0.1</version>
202+
<executions>
203+
<execution>
204+
<id>sign-artifacts</id>
205+
<phase>verify</phase>
206+
<goals>
207+
<goal>sign</goal>
208+
</goals>
209+
<configuration>
210+
<gpgArguments>
211+
<arg>--pinentry-mode</arg>
212+
<arg>loopback</arg>
213+
</gpgArguments>
214+
</configuration>
215+
</execution>
216+
</executions>
217+
</plugin>
218+
</plugins>
219+
</build>
220+
</profile>
221+
222+
<profile>
223+
<id>deploy-central</id>
224+
<distributionManagement>
225+
<repository>
226+
<id>ossrh</id>
227+
<name>Maven Central</name>
228+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
229+
</repository>
230+
</distributionManagement>
231+
<build>
232+
<plugins>
233+
<plugin>
234+
<groupId>org.sonatype.plugins</groupId>
235+
<artifactId>nexus-staging-maven-plugin</artifactId>
236+
<version>1.6.8</version>
237+
<extensions>true</extensions>
238+
<configuration>
239+
<serverId>ossrh</serverId>
240+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
241+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
242+
</configuration>
243+
</plugin>
244+
</plugins>
245+
</build>
246+
</profile>
247+
248+
<profile>
249+
<id>deploy-github</id>
250+
<distributionManagement>
251+
<repository>
252+
<id>github</id>
253+
<name>GitHub Packages</name>
254+
<url>https://maven.pkg.github.com/cryptomator/integrations-linux</url>
255+
</repository>
256+
</distributionManagement>
257+
</profile>
258+
</profiles>
205259
</project>

0 commit comments

Comments
 (0)