feat: add maven release workflow for github packages

This commit is contained in:
Thomas
2026-04-26 15:52:31 +02:00
parent fd1fcaa221
commit cac4342c7b
2 changed files with 64 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
name: Maven Release Build
# This lets you trigger the build manually from the GitHub Actions tab
on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'Release Version (e.g., 1.0.0)'
required: true
developmentVersion:
description: 'Next Dev Version (e.g., 1.0.1-SNAPSHOT)'
required: true
jobs:
release:
runs-on: ubuntu-latest
# Crucial: Give the action permission to push commits and tags back to the repo
permissions:
contents: write
packages: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
# You need to fetch all history so the release plugin can see tags
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17' # Change this to your Java version
distribution: 'temurin'
server-id: github # Must match the <id> in your distributionManagement
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN
- name: Configure Git User
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
- name: Perform Maven Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mvn -B release:prepare release:perform \
-DreleaseVersion=${{ github.event.inputs.releaseVersion }} \
-DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}
+14
View File
@@ -8,6 +8,20 @@
<artifactId>comfyuimodel-downloader</artifactId>
<version>1.0-SNAPSHOT</version>
<scm>
<connection>scm:git:https://github.com/thomaskippster/comfymodeldownloader.git</connection>
<developerConnection>scm:git:https://github.com/thomaskippster/comfymodeldownloader.git</developerConnection>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/thomaskippster/comfymodeldownloader</url>
</repository>
</distributionManagement>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>