blade-tool/.github/workflows/publish-snapshot.yml

29 lines
709 B
YAML
Raw Permalink Normal View History

2024-06-12 13:51:24 +08:00
name: Publish Snapshot
on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
2024-06-12 20:13:15 +08:00
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
2024-06-12 13:51:24 +08:00
with:
distribution: 'zulu'
java-version: 17
2024-06-12 20:13:15 +08:00
cache: 'maven'
cache-dependency-path: 'pom.xml'
2024-06-12 13:51:24 +08:00
server-id: oss
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish to the Maven Central Repository
run: |
2024-06-12 15:45:29 +08:00
mvn clean package deploy -P !develop
2024-06-12 13:51:24 +08:00
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}