Skip to content

Commit b119b4f

Browse files
authored
Merge pull request #120 from scalacenter/debug-release
debug: Add import step manually
2 parents bb896be + d9a7d95 commit b119b4f

1 file changed

Lines changed: 26 additions & 11 deletions

File tree

.github/workflows/release.yml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: release
2-
1+
name: Release ${{ inputs.version }}
2+
33
on:
44
workflow_dispatch:
55
inputs:
@@ -21,25 +21,40 @@ jobs:
2121
distribution: 'temurin'
2222
java-version: '11'
2323
cache: 'maven'
24-
server-id: central # Value of the distributionManagement/repository/id field of the pom.xml
25-
server-username: MAVEN_USERNAME
26-
server-password: MAVEN_CENTRAL_TOKEN
27-
gpg-private-key: ${{ secrets.PGP_SECRET }}
28-
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
29-
env:
30-
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
31-
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_PASSWORD }}
32-
MAVEN_GPG_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
24+
# server-id: central # Value of the distributionManagement/repository/id field of the pom.xml
25+
# server-username: MAVEN_USERNAME
26+
# server-password: MAVEN_CENTRAL_TOKEN
27+
# gpg-private-key: ${{ secrets.PGP_SECRET }}
28+
# gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
29+
# env:
30+
# MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
31+
# MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_PASSWORD }}
32+
# MAVEN_GPG_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
3333

3434
- name: Setup git profile
3535
run: |
3636
git config --global user.name "github-actions[bot]"
3737
git config --global user.email "123456+github-actions[bot]@users.noreply.github.com"
3838
39+
- name: Import GPG key manually
40+
run: |
41+
echo "${{ secrets.PGP_SECRET }}" | base64 -d | gpg --import --batch --no-tty
42+
gpg --list-secret-keys
43+
env:
44+
GNUPGHOME: /home/runner/.gnupg
45+
46+
- name: Test GPG signing
47+
run: |
48+
echo "test message" | gpg --clearsign --batch --no-tty --pinentry-mode loopback
49+
env:
50+
GNUPGHOME: /home/runner/.gnupg
51+
MAVEN_GPG_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
52+
3953
- name: Publish to Apache Maven Central
4054
run: mvn clean -Darguments=-DskipTests release:prepare release:perform -DreleaseVersion=${{github.event.inputs.version}} -Prelease
4155
env:
4256
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
4357
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_PASSWORD }}
4458
MAVEN_GPG_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
59+
GNUPGHOME: /home/runner/.gnupg
4560
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)