Skip to content

Commit 5325a04

Browse files
committed
Move access token after build to minimize which steps can access it
1 parent 95fee7e commit 5325a04

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ jobs:
114114
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
115115
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
116116

117+
- name: Build mod
118+
run: ./gradlew build
119+
117120
# https://learn.microsoft.com/en-us/azure/devops/artifacts/quickstarts/github-actions
118121
- name: Get Azure access token
119122
if: inputs.dry_run == false
@@ -122,9 +125,6 @@ jobs:
122125
echo "::add-mask::$accessToken"
123126
echo "MAVEN_PASSWORD=$accessToken" >> $GITHUB_ENV
124127
125-
- name: Build mod
126-
run: ./gradlew build
127-
128128
- name: Publish to ${{ inputs.dry_run && 'Maven Local' || 'Maven' }}
129129
run: ./gradlew ${{ inputs.dry_run && 'publishToMavenLocal' || 'publish' }}
130130

0 commit comments

Comments
 (0)