Skip to content

Commit 1bd4dac

Browse files
Merge branch 'release/0.8.1'
2 parents a09db20 + 27acd92 commit 1bd4dac

File tree

2 files changed

+60
-50
lines changed

2 files changed

+60
-50
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,44 @@
11
name: Build
22
on:
33
[push]
4+
5+
env:
6+
JAVA_VERSION: 21
7+
48
jobs:
59
build:
610
name: Build
711
runs-on: ubuntu-latest
8-
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
12+
permissions:
13+
id-token: write # Required for the attestations step
14+
contents: write # Required for the release step
15+
attestations: write # Required for the attestations step
16+
packages: write # Required for the deploy to GitHub Packages step
917
steps:
1018
- uses: actions/checkout@v4
1119
with:
1220
fetch-depth: 0
13-
- uses: actions/setup-java@v3
21+
- uses: actions/setup-java@v4
1422
with:
15-
java-version: 21
23+
java-version: ${{ env.JAVA_VERSION }}
1624
distribution: temurin
1725
cache: 'maven'
26+
server-id: central
27+
server-username: MAVEN_CENTRAL_USERNAME
28+
server-password: MAVEN_CENTRAL_PASSWORD
1829
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
1930
gpg-passphrase: MAVEN_GPG_PASSPHRASE
31+
2032
- name: Cache SonarCloud packages
21-
uses: actions/cache@v3
33+
uses: actions/cache@v4
2234
with:
2335
path: ~/.sonar/cache
2436
key: ${{ runner.os }}-sonar
2537
restore-keys: ${{ runner.os }}-sonar
38+
2639
- name: Build and Test
2740
run: >
28-
mvn -B verify
41+
mvn -B verify --no-transfer-progress
2942
jacoco:report
3043
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
3144
-Pcoverage
@@ -35,35 +48,43 @@ jobs:
3548
env:
3649
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
3750
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
38-
- name: Deploy to GitHub Packages
51+
52+
- name: Deploy to Maven Central
3953
if: startsWith(github.ref, 'refs/tags/')
40-
run: mvn -B deploy -Psign,deploy-github -DskipTests --no-transfer-progress
54+
run: mvn -B deploy -Psign,deploy-central -DskipTests --no-transfer-progress
4155
env:
42-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
57+
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
4358
MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
44-
- uses: actions/setup-java@v3
59+
MAVEN_GPG_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
60+
MAVEN_GPG_KEY_FINGERPRINT: ${{ vars.RELEASES_GPG_KEY_FINGERPRINT }}
61+
62+
- uses: actions/setup-java@v4
4563
if: startsWith(github.ref, 'refs/tags/')
4664
with:
47-
java-version: 21
65+
java-version: ${{ env.JAVA_VERSION }}
4866
distribution: temurin
4967
cache: 'maven'
50-
server-id: ossrh
51-
server-username: MAVEN_USERNAME
52-
server-password: MAVEN_PASSWORD
53-
- name: Deploy to OSSRH
68+
69+
- name: Deploy to GitHub Packages
5470
if: startsWith(github.ref, 'refs/tags/')
55-
run: mvn -B deploy -Psign,deploy-central -DskipTests --no-transfer-progress
71+
run: mvn -B deploy -Psign,deploy-github -DskipTests --no-transfer-progress
5672
env:
57-
MAVEN_OPTS: >
58-
--add-opens=java.base/java.util=ALL-UNNAMED
59-
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED
60-
--add-opens=java.base/java.text=ALL-UNNAMED
61-
--add-opens=java.desktop/java.awt.font=ALL-UNNAMED
62-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
63-
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6474
MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
75+
MAVEN_GPG_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
76+
MAVEN_GPG_KEY_FINGERPRINT: ${{ vars.RELEASES_GPG_KEY_FINGERPRINT }}
77+
78+
- name: Attest
79+
if: startsWith(github.ref, 'refs/tags/')
80+
uses: actions/attest-build-provenance@v2
81+
with:
82+
subject-path: |
83+
target/tiny-oauth2-client-*.jar
84+
target/tiny-oauth2-client-*.pom
85+
6586
- name: Release
6687
if: startsWith(github.ref, 'refs/tags/')
67-
uses: softprops/action-gh-release@v1
88+
uses: softprops/action-gh-release@v2
6889
with:
6990
generate_release_notes: true

pom.xml

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>io.github.coffeelibs</groupId>
77
<artifactId>tiny-oauth2-client</artifactId>
8-
<version>0.8.0</version>
8+
<version>0.8.1</version>
99
<name>Tiny OAuth2 Client</name>
1010
<description>Zero Dependency RFC 8252 Authorization Flow</description>
1111
<inceptionYear>2022</inceptionYear>
@@ -41,20 +41,20 @@
4141
<dependency>
4242
<groupId>org.jetbrains</groupId>
4343
<artifactId>annotations</artifactId>
44-
<version>24.0.1</version>
44+
<version>26.0.2</version>
4545
<scope>provided</scope>
4646
</dependency>
4747

4848
<dependency>
4949
<groupId>org.junit.jupiter</groupId>
5050
<artifactId>junit-jupiter</artifactId>
51-
<version>5.10.0</version>
51+
<version>5.11.4</version>
5252
<scope>test</scope>
5353
</dependency>
5454
<dependency>
5555
<groupId>org.mockito</groupId>
5656
<artifactId>mockito-core</artifactId>
57-
<version>5.6.0</version>
57+
<version>5.15.2</version>
5858
<scope>test</scope>
5959
</dependency>
6060
</dependencies>
@@ -64,20 +64,20 @@
6464
<plugin>
6565
<groupId>org.apache.maven.plugins</groupId>
6666
<artifactId>maven-compiler-plugin</artifactId>
67-
<version>3.11.0</version>
67+
<version>3.13.0</version>
6868
<configuration>
6969
<release>11</release>
7070
</configuration>
7171
</plugin>
7272
<plugin>
7373
<groupId>org.apache.maven.plugins</groupId>
7474
<artifactId>maven-surefire-plugin</artifactId>
75-
<version>3.2.1</version>
75+
<version>3.5.2</version>
7676
</plugin>
7777
<plugin>
7878
<groupId>org.apache.maven.plugins</groupId>
7979
<artifactId>maven-source-plugin</artifactId>
80-
<version>3.3.0</version>
80+
<version>3.3.1</version>
8181
<executions>
8282
<execution>
8383
<id>attach-sources</id>
@@ -90,7 +90,7 @@
9090
<plugin>
9191
<groupId>org.apache.maven.plugins</groupId>
9292
<artifactId>maven-javadoc-plugin</artifactId>
93-
<version>3.6.0</version>
93+
<version>3.11.2</version>
9494
<executions>
9595
<execution>
9696
<id>attach-javadocs</id>
@@ -111,7 +111,7 @@
111111
<plugin>
112112
<groupId>org.jacoco</groupId>
113113
<artifactId>jacoco-maven-plugin</artifactId>
114-
<version>0.8.11</version>
114+
<version>0.8.12</version>
115115
<executions>
116116
<execution>
117117
<id>prepare-agent</id>
@@ -137,7 +137,7 @@
137137
<plugins>
138138
<plugin>
139139
<artifactId>maven-gpg-plugin</artifactId>
140-
<version>3.1.0</version>
140+
<version>3.2.7</version>
141141
<executions>
142142
<execution>
143143
<id>sign-artifacts</id>
@@ -146,10 +146,7 @@
146146
<goal>sign</goal>
147147
</goals>
148148
<configuration>
149-
<gpgArguments>
150-
<arg>--pinentry-mode</arg>
151-
<arg>loopback</arg>
152-
</gpgArguments>
149+
<signer>bc</signer>
153150
</configuration>
154151
</execution>
155152
</executions>
@@ -160,24 +157,16 @@
160157

161158
<profile>
162159
<id>deploy-central</id>
163-
<distributionManagement>
164-
<repository>
165-
<id>ossrh</id>
166-
<name>Maven Central</name>
167-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
168-
</repository>
169-
</distributionManagement>
170160
<build>
171161
<plugins>
172162
<plugin>
173-
<groupId>org.sonatype.plugins</groupId>
174-
<artifactId>nexus-staging-maven-plugin</artifactId>
175-
<version>1.6.13</version>
163+
<groupId>org.sonatype.central</groupId>
164+
<artifactId>central-publishing-maven-plugin</artifactId>
165+
<version>0.7.0</version>
176166
<extensions>true</extensions>
177167
<configuration>
178-
<serverId>ossrh</serverId>
179-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
180-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
168+
<publishingServerId>central</publishingServerId>
169+
<autoPublish>true</autoPublish>
181170
</configuration>
182171
</plugin>
183172
</plugins>

0 commit comments

Comments
 (0)