ci: changed trigger to release published and changed some settings
This commit is contained in:
@@ -8,9 +8,9 @@
|
|||||||
name: Publish Packages to GitHub Packages with Gradle
|
name: Publish Packages to GitHub Packages with Gradle
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
release:
|
||||||
branches:
|
types:
|
||||||
- main
|
- published
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -51,19 +51,17 @@ jobs:
|
|||||||
- name: Set up JDK 17
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: '17'
|
java-version: "17"
|
||||||
distribution: 'corretto'
|
distribution: "corretto"
|
||||||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
|
||||||
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
|
||||||
- name: Grant Execution Authority to Gradlew
|
- name: Grant Execution Authority to Gradlew
|
||||||
run: chmod +x ./gradlew
|
run: chmod +x ./gradlew
|
||||||
|
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew build
|
run: ./gradlew build -PartefactVersion=${{ github.event.release.tag_name }} # Overwrite artefactVersion
|
||||||
|
|
||||||
- name: Publish to Maven Central
|
- name: Publish to Maven Central
|
||||||
run: ./gradlew publish
|
run: ./gradlew publish
|
||||||
|
|||||||
Reference in New Issue
Block a user