Skip to content
Merged
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
24 changes: 12 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,27 @@ jobs:
if: |
contains(github.event.head_commit.message, 'release') && github.event_name == 'push'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: 🔀
- name: Create Pull Request
uses: BaharaJr/create-pr@0.0.1
with:
GITHUB_TOKEN: ${{secrets.TOKEN}}
DESTINATION_BRANCH: main
KEYWORD: release

CHECK_MESSAGE:
if: |
github.event_name == 'pull_request'
if: github.event_name == 'pull_request'
name: COMMIT CHECK
runs-on: ubuntu-latest
outputs:
sms: ${{ steps.sms_id.outputs.sms }}
steps:
- name: 🚚
- name: Checkout PR Head
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: ❇️
- name: Get Commit Message
id: sms_id
run: echo "sms=$(git show -s --format=%s)" >> "$GITHUB_OUTPUT"

Expand All @@ -46,11 +42,14 @@ jobs:
permissions:
contents: write
needs: CHECK_MESSAGE
# Only run if the PR commit message contains 'release'
if: ${{ contains(needs.CHECK_MESSAGE.outputs.sms, 'release') }}
steps:
- name: Checkout code
- name: Checkout Source Branch
uses: actions/checkout@v4
with:
# Check out the actual branch (develop), not the merge commit
ref: ${{ github.head_ref }}
fetch-depth: 0
token: ${{ secrets.TOKEN }}

Expand Down Expand Up @@ -100,8 +99,9 @@ jobs:
git commit -m "Release v$NEW_VERSION [skip ci]"
git tag "v$NEW_VERSION"

# 5. Push changes
git push origin main
# 5. Push changes back to the source branch (develop)
# Use HEAD:${{ github.head_ref }} to ensure it pushes to the PR source branch
git push origin HEAD:${{ github.head_ref }}
git push origin "v$NEW_VERSION"

- name: Build with Gradle
Expand All @@ -127,4 +127,4 @@ jobs:

echo "Pushing images..."
docker push $IMAGE_NAME:$VERSION
docker push $IMAGE_NAME:latest
docker push $IMAGE_NAME:latest
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ out/

http

ROADMAP
ROADMAP

.env
Loading