Skip to content

Commit

Permalink
fixing release creation
Browse files Browse the repository at this point in the history
  • Loading branch information
stoerr committed Apr 28, 2024
1 parent 06e9c01 commit 1339a90
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/createereleasenodeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

env:
SUBDIR: ${{ github.event.inputs.subdir }}
MVNCMD: mvn -B -ntp
MVNCMD: mvn -B -ntp -P release
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ github.actor }}

Expand All @@ -35,6 +35,8 @@ jobs:
java-version: '11'
distribution: 'temurin'
cache: maven
# gpg-private-key: ${{ secrets.GPG_SECRET_KEYS }}
gpg-passphrase: GPG_PASSPHRASE

- name: Dump settings
run: cat $HOME/.m2/settings.xml
Expand All @@ -52,19 +54,39 @@ jobs:
run: |
echo '${{ toJSON(github) }}'
- name: Try to set a master password
run: |
MASTERPWD=$(openssl rand -base64 25)
echo "<settingsSecurity> <master>$(mvn --encrypt-master-password "$MASTERPWD")</master></settingsSecurity>" > $HOME/.m2/settings-security.xml
# echo "MASTERPWD=\"$MASTERPWD\"" >> $GITHUB_ENV
# The master password isn't actually used, but the maven-gpg-plugin complains otherwise.
- name: Git & Maven Status
run: |
$MVNCMD -version
git remote -v
git status --untracked-files --ignored
git log -3 --no-color --decorate
$MVNCMD -version
find . -name 'settings*xml'
find /home/runner/work/ -name 'settings*xml'
- name: Mvn Effective POM
run: $MVNCMD -N help:effective-pom

- name: Mvn Effective Settings
run: $MVNCMD -N help:effective-settings

- name: Import GPG key
env:
GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }}
GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }}
run: |
echo $GPG_SECRET_KEYS | base64 --decode | gpg --import --no-tty --batch --yes
echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust --no-tty --batch --yes
gpg -v --refresh-keys
gpg --list-secret-keys --keyid-format LONG
- name: Configure git user for release commits
# specific to repository - we don't want that to be the same thing in a fork.
env:
Expand Down Expand Up @@ -114,6 +136,8 @@ jobs:
# create a release without deploying it since we still have trouble with maven central
- name: Perform release
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
$MVNCMD -X release:perform -DlocalCheckout=true -DdeployAtEnd=true "-Darguments=-DdeployAtEnd=true" "-Dgoals=clean install"
Expand Down

0 comments on commit 1339a90

Please sign in to comment.