Skip to content

Commit

Permalink
chore: Update GitHub Actions workflow to improve version retrieval an…
Browse files Browse the repository at this point in the history
…d streamline GPG key management

- Changed the output variable name from 'name' to 'version' for clarity in the version retrieval step.
- Removed the GPG key import step to simplify the workflow and enhance deployment efficiency.
- These changes contribute to a more maintainable and clear GitHub Actions configuration for future releases.
  • Loading branch information
Marvin Zhang committed Jan 3, 2025
1 parent 55f9406 commit 83fc3e6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
distribution: 'temurin'
- name: Get version
id: get_version
run: echo "name=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
- name: Pad run number
id: pad_run_number
run: echo "padded_run_number=$(printf '%04d' ${{ github.run_number }})" > $GITHUB_OUTPUT
Expand Down Expand Up @@ -52,8 +52,6 @@ jobs:
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Import GPG key
run: echo "${{ secrets.GPG_PRIVATE_KEY }}" | base64 --decode | gpg --import --batch
- name: Set version
run: mvn versions:set -DnewVersion=${{ github.event.release.tag_name }}
- name: Publish package
Expand Down

0 comments on commit 83fc3e6

Please sign in to comment.