diff --git a/.github/workflows/maven_deploy.yml b/.github/workflows/maven_deploy.yml new file mode 100644 index 0000000..8085adc --- /dev/null +++ b/.github/workflows/maven_deploy.yml @@ -0,0 +1,33 @@ +name: Deploy Snapshot + +on: + workflow_dispatch: + branches: + - 'master' + - +jobs: + deploy: + name: Deploy Snapshot + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: 'main' + fetch-depth: 0 + + - name: Setup Java + uses: actions/setup-java@v3 + with: + java-version: 11 + distribution: '' + server-id: sonatype-nexus-snapshots + server-username: MAVEN_USERNAME + server-password: MAVEN_CENTRAL_TOKEN + + - name: Deploy to Maven Central + run: mvn deploy + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index f8722d6..567bf24 100644 --- a/pom.xml +++ b/pom.xml @@ -45,9 +45,9 @@ - github - GitHub starcoin-java Apache Maven Packages - https://maven.pkg.github.com/starcoinorg/starcoin-java + sonatype-nexus-staging + Sonatype Nexus release repository + https://oss.sonatype.org/service/local/staging/deploy/maven2/ ossrh