-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (37 loc) · 1.25 KB
/
trigger-publish-packages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Publish package to the Maven Central Repository and GitHub Packages
on:
push:
branched:
- main
- feat/241227-v0.4
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
# - name: Set up Java for publishing to Maven Central Repository
# uses: actions/setup-java@v4
# with:
# java-version: '8'
# distribution: 'temurin'
# server-id: ossrh
# server-username: MAVEN_USERNAME
# server-password: MAVEN_PASSWORD
# - name: Publish to the Maven Central Repository
# run: mvn --batch-mode clean deploy -Pcoding,publish-central -DskipTests
# env:
# MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
# MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- name: Set up Java for publishing to GitHub Packages
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
- name: Publish to GitHub Packages
run: mvn --batch-mode clean deploy -DaltDeploymentRepository=github::https://maven.pkg.github.com/xooooooooox/radp -DskipTests
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}