Files
MCRun/.gitea/workflows/publish.yml
T
KartoffelChipss de3d170347
Deploy to Maven Repository / deploy (release) Failing after 10m9s
Fix Maven deployment repository syntax
2026-11-01 20:02:45 +01:00

40 lines
1.1 KiB
YAML

name: Deploy to Maven Repository
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
# Writes a <server id="smr"> entry to ~/.m2/settings.xml that reads the credentials from these env vars
server-id: smr
server-username: MAVEN_DEPLOY_USER
server-password: MAVEN_DEPLOY_TOKEN
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6
- name: Set version from release tag
run: mvn -B versions:set -DnewVersion="${{ github.event.release.tag_name }}" -DgenerateBackupPoms=false
- name: Build and deploy
env:
MAVEN_DEPLOY_USER: ${{ vars.MAVEN_DEPLOY_USER }}
MAVEN_DEPLOY_TOKEN: ${{ secrets.MAVEN_DEPLOY_TOKEN }}
run: |
mvn -B -U clean deploy -DskipTests \
-DaltDeploymentRepository=smr::default::${{ vars.MAVEN_REPO_URL }}