Skip to content

Commit 6c9e8d2

Browse files
committed
Fix snapshot publishing to use Maven Central instead of GitHub Packages
1 parent 80621d5 commit 6c9e8d2

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/publish-snapshot.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Snapshot to GitHub Packages
1+
name: Publish Snapshot to Maven Central
22

33
env:
44
HUSKY: 0
@@ -8,15 +8,14 @@ on:
88

99
permissions:
1010
contents: read
11-
packages: write
1211

1312
concurrency:
1413
group: publish-snapshot
1514
cancel-in-progress: false
1615

1716
jobs:
1817
publish-snapshot:
19-
name: Publish SNAPSHOT to GitHub Packages
18+
name: Publish SNAPSHOT to Maven Central
2019
runs-on: ubuntu-latest
2120
steps:
2221
- uses: actions/checkout@v6
@@ -31,9 +30,9 @@ jobs:
3130
java-version: "17"
3231
distribution: "temurin"
3332
cache: "maven"
34-
server-id: github
35-
server-username: PACKAGES_USERNAME
36-
server-password: PACKAGES_TOKEN
33+
server-id: central
34+
server-username: MAVEN_USERNAME
35+
server-password: MAVEN_PASSWORD
3736

3837
- name: Verify version is a SNAPSHOT
3938
run: |
@@ -45,10 +44,10 @@ jobs:
4544
fi
4645
echo "### Snapshot Publish" >> $GITHUB_STEP_SUMMARY
4746
echo "- **Version:** $VERSION" >> $GITHUB_STEP_SUMMARY
48-
echo "- **Repository:** GitHub Packages (github/copilot-sdk-java)" >> $GITHUB_STEP_SUMMARY
47+
echo "- **Repository:** Maven Central Snapshots" >> $GITHUB_STEP_SUMMARY
4948
5049
- name: Deploy Snapshot
5150
run: mvn -B deploy -DskipTests
5251
env:
53-
PACKAGES_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54-
PACKAGES_USERNAME: ${{ github.actor }}
52+
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
53+
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}

0 commit comments

Comments
 (0)