Skip to content

Commit b4e3479

Browse files
committed
fix: use envvars in release action
1 parent fae65dd commit b4e3479

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ jobs:
2020
- uses: actions/checkout@v3
2121
- name: Configure Git User # may be removed after https://github.com/actions/checkout/issues/13 is resolved
2222
run: |
23-
git config user.email "${{ github.actor }}@users.noreply.github.com"
24-
git config user.name "${{ github.actor }}"
23+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
24+
git config user.name "$GITHUB_ACTOR"
25+
env:
26+
GITHUB_ACTOR: ${{ github.actor }}
2527
- name: Set up Maven
2628
uses: actions/setup-java@v3
2729
with:
@@ -33,11 +35,13 @@ jobs:
3335
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} # Value of the GPG private key to import
3436
gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase
3537
- name: Release and publish package
36-
run: mvn release:prepare release:perform -B -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}
38+
run: mvn release:prepare release:perform -B -DreleaseVersion="$RELEASE_VERSION" -DdevelopmentVersion="$DEVELOPMENT_VERSION"
3739
env:
3840
MAVEN_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
3941
MAVEN_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
4042
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
43+
RELEASE_VERSION: ${{ github.event.inputs.releaseVersion }}
44+
DEVELOPMENT_VERSION: ${{ github.event.inputs.developmentVersion }}
4145
- name: Upload to Central Publisher Portal
4246
run: |
4347
AUTH=$(echo -n "${{ secrets.CENTRAL_USERNAME }}:${{ secrets.CENTRAL_PASSWORD }}" | base64)

0 commit comments

Comments
 (0)