Skip to content

Commit f7a4d06

Browse files
authored
Update java-publish-package.yml (microsoft#85)
1 parent 612956c commit f7a4d06

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

‎.github/workflows/java-publish-package.yml‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ on:
77
- closed
88
branches: [ "main" ]
99

10+
permissions:
11+
contents: read
12+
packages: write
1013

1114
jobs:
1215
if_merged:
1316
if: github.event.pull_request.merged == true
1417
runs-on: ubuntu-latest
15-
permissions:
16-
contents: read
17-
packages: write
1818
steps:
1919
- name: Checkout
2020
uses: actions/checkout@v4
@@ -26,12 +26,6 @@ jobs:
2626
distribution: microsoft
2727
cache: maven
2828

29-
# Builds the project with Maven using the matrix JDK version
30-
- name: Deploy to github pacakges
31-
run: ./mvnw -B -DskipTests -Pcompile-jdk8 -P-compile-jdk17 -Pgithub-packages clean deploy --file pom.xml
32-
env:
33-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34-
3529
- name: Build artifacts
3630
run: ./mvnw -B -DskipTests -Pcompile-jdk8 -P-compile-jdk17 clean deploy --file pom.xml -DaltDeploymentRepository=local::file:///tmp/target/staging-deploy
3731

@@ -40,3 +34,8 @@ jobs:
4034
with:
4135
name: Artifacts
4236
path: /tmp/target/staging-deploy
37+
38+
- name: Deploy to github packages
39+
run: ./mvnw -B -DskipTests -Pcompile-jdk8 -P-compile-jdk17 -Pgithub-packages clean deploy --file pom.xml
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)