Skip to content

Commit 16d0097

Browse files
committed
Another attempt to automate the release
1 parent 860bb83 commit 16d0097

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
name: Release new version
2+
permissions:
3+
contents: write
24

35
on:
46
workflow_dispatch
57

68
jobs:
79
build:
810
runs-on: ubuntu-latest
9-
1011
steps:
1112
- uses: actions/checkout@v5
12-
- uses: webfactory/ssh-agent@v0.9.1
13-
with:
14-
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
1513

1614
- name: Setup git profile
1715
run: |
@@ -21,18 +19,19 @@ jobs:
2119
- name: Set up JDK
2220
uses: actions/setup-java@v5
2321
with:
24-
distribution: 'temurin'
22+
distribution: temurin
2523
java-version: '17'
2624
cache: maven
2725
server-id: central # Value of the distributionManagement/repository/id field of the pom.xml
2826
server-username: SONATYPE_USERNAME
2927
server-password: SONATYPE_PASSWORD
30-
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # has to be read directly from secrets
28+
gpg-private-key: ${{ secrets.PGP_SECRET }} # has to be read directly from secrets
3129
gpg-passphrase: MAVEN_GPG_PASSPHRASE # default name used by maven-gpg-plugin
3230

33-
- name: Release new version
34-
run: mvn clean -Darguments=-DskipTests -ntp -B release:clean release:prepare release:perform -P release
31+
- name: Release
3532
env:
3633
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
3734
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
38-
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
35+
MAVEN_GPG_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
36+
run: |
37+
mvn -ntp -B release:clean release:prepare release:perform -P release -Darguments="-DskipTests"

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ under the License.
3131
<url>https://scoverage.github.io/scoverage-maven-plugin/${project.version}/</url>
3232

3333
<scm>
34-
<connection>scm:git:git://github.com/scoverage/scoverage-maven-plugin.git</connection>
34+
<connection>scm:git:https://github.com/scoverage/scoverage-maven-plugin.git</connection>
3535
<developerConnection>scm:git:git@github.com:scoverage/scoverage-maven-plugin.git</developerConnection>
3636
<url>https://github.com/scoverage/scoverage-maven-plugin/tree/${project.scm.tag}</url>
3737
<tag>HEAD</tag>

0 commit comments

Comments
 (0)