Skip to content

Commit

Permalink
fix release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy2003 committed Jun 20, 2024
1 parent ca69856 commit 10f5024
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ on:

jobs:
build:
name: Build
name: Build and Tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-jdk
- uses: ./.github/actions/setup-maven-cache
- uses: ./.github/actions/run-tests

- name: Prepare for release
run: ./mvnw versions:set -DremoveSnapshot=true -DgenerateBackupPoms=false
Expand All @@ -21,24 +20,14 @@ jobs:
run: echo "VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV

- name: Build
run: ./mvnw -P release --batch-mode -DskipTests package
run: ./mvnw -P release --batch-mode package

- name: Upload JARs as artifact
uses: actions/upload-artifact@v2
with:
name: jars
path: ./target/*.jar

commit_and_tag:
name: Commit and Tag
needs: build
runs-on: ubuntu-latest
steps:
- uses: ./.github/actions/setup-jdk

- name: Set version
run: ./mvnw versions:set -DnewVersion=${{ env.VERSION }} -DgenerateBackupPoms=false

- name: Update README.md
run: sed -i "s|<version>.*</version>|<version>${{ env.VERSION }}</version>|g" README.md

Expand All @@ -64,7 +53,7 @@ jobs:

create_github_release_and_attach_artifacts:
name: Create GitHub Release and attach artifacts
needs: commit_and_tag
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
Expand Down

0 comments on commit 10f5024

Please sign in to comment.