Skip to content

Commit

Permalink
fix maven release (via #339)
Browse files Browse the repository at this point in the history
  • Loading branch information
eroshenkoam authored Oct 23, 2023
1 parent 15b42b3 commit 908ccad
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK
uses: actions/setup-java@v1
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: temurin
java-version: 11
cache: 'maven'
- name: "Build"
run: ./mvnw package
35 changes: 21 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
name: Release

on:
release:
types: [published]
workflow_dispatch:
inputs:
releaseVersion:
description: "The release version in <MAJOR>.<MINOR>.<PATCH> format"
required: true
nextVersion:
description: "The next version in <MAJOR>.<MINOR> format WITHOUT SNAPSHOT SUFFIX"
required: true

jobs:
build:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: '11'
- name: "Maven Build"
run: ./mvnw package -Pversion=${GITHUB_REF:10}
- name: "Maven Publish"
run: |
printf "userName=${{ secrets.JENKINS_USERNAME }}\npassword=${{ secrets.JENKINS_PASSWORD }}\n" > ~/.jenkins-ci.org
./mvnw release:prepare release:perform -Pversion=${GITHUB_REF:10}
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
server-id: maven.jenkins-ci.org
server-username: ${{ secrets.JENKINS_USERNAME }}
server-password: ${{ secrets.JENKINS_TOKEN }}
- run: |
./mvnw versions:set -DnewVersion=${{ env.VERSION }}
./mvnw publish
4 changes: 0 additions & 4 deletions Jenkinsfile

This file was deleted.

0 comments on commit 908ccad

Please sign in to comment.