Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Pull Request CI

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Build and Test
uses: qcastel/github-actions-maven-cmd@master
with:
maven-args: "clean install -Dmaven.test.skip=true -Ddockerfile.skip -DdockerCompose.skip -Djib.skip"
37 changes: 28 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
name: release version
name: Prepare Maven Release

on:
push:
branches:
- main

jobs:
build:
prepare-release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"

steps:
- uses: actions/checkout@v3

- name: Build and Test
uses: qcastel/github-actions-maven-cmd@master
with:
maven-args: "clean install -Dmaven.test.skip=true -Ddockerfile.skip -DdockerCompose.skip -Djib.skip"
fetch-depth: 0 # Required for tags and release plugin

- name: Setup Git
run: |
git config user.name "phasetwo-bot"
git config user.email "support@phasetwo.io"

- name: Create release branch
run: |
export BRANCH_NAME=release-${{ github.run_number }}
git checkout -b $BRANCH_NAME
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV

- name: Release
- name: Run Maven release
uses: qcastel/github-actions-maven-release@master
with:
release-branch-name: "main"
release-branch-name: ${{ env.BRANCH_NAME }}
version-patch: true

git-release-bot-name: "phasetwo-bot"
Expand All @@ -38,3 +45,15 @@ jobs:
docker-registry-id: ossrh
docker-registry-username: ${{ secrets.OSSRH_USERNAME }}
docker-registry-password: ${{ secrets.OSSRH_PASSWORD }}

- name: Push release branch
run: git push origin ${{ env.BRANCH_NAME }}

- name: Create Pull Request to main
uses: peter-evans/create-pull-request@v5
with:
title: "Release: ${{ env.BRANCH_NAME }}"
branch: ${{ env.BRANCH_NAME }}
base: main
body: "Automated Maven release PR"
author: phasetwo-bot <support@phasetwo.io>