diff options
Diffstat (limited to '.github/workflows/release.yml')
-rw-r--r-- | .github/workflows/release.yml | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a3f066d..3176f73 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,16 +12,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - steps: - - name: Setup Signing Key - run: | - gpg-agent --daemon --default-cache-ttl 7200 - echo -e "${{ secrets.GPG_SIGNING_KEY }}" | gpg --batch --import --no-tty - echo "hello world" > temp.txt - gpg --detach-sig --yes -v --output=/dev/null --pinentry-mode loopback --passphrase "${{ secrets.GPG_PASSPHRASE }}" temp.txt - rm temp.txt - gpg --list-secret-keys --keyid-format LONG - + steps: - name: Checkout uses: actions/checkout@v2.4.0 @@ -34,12 +25,15 @@ jobs: server-id: sonatype-nexus-staging server-username: CI_DEPLOY_USERNAME server-password: CI_DEPLOY_PASSWORD + gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Bump Version Number run: | mvn --no-transfer-progress versions:set versions:commit -DnewVersion="${{ github.event.inputs.version }}" + mvn --no-transfer-progress versions:set versions:commit -DnewVersion="${{ github.event.inputs.version }}" -pl eclipse_plugin mvn tycho-versions:update-eclipse-metadata -pl eclipse_plugin - git ls-files | grep 'pom.xml$' | xargs git add + git ls-files | grep -E '(pom.xml|MANIFEST.MF)$' | xargs git add git config --global user.email "${{ github.actor }}@users.noreply.github.com" git config --global user.name "${{ github.actor }}" git commit -m "Release google-java-format ${{ github.event.inputs.version }}" @@ -51,6 +45,7 @@ jobs: env: CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }} CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} run: mvn --no-transfer-progress -pl '!eclipse_plugin' -P sonatype-oss-release clean deploy -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" |