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
1 change: 1 addition & 0 deletions .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Custom CI/CD
.github/workflows/auto-close-empty-prs.yml
.github/workflows/ci.yml
.github/workflows/draft-release.yml

# Our own license
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,28 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check if tag is on main
id: tag-on-main
run: |
if git merge-base --is-ancestor "$GITHUB_SHA" origin/main; then
echo "on-main=true" >> "$GITHUB_OUTPUT"
else
echo "on-main=false" >> "$GITHUB_OUTPUT"
echo "::notice::Skipping publish: tag $GITHUB_REF_NAME is not on main"
fi

- name: Set up Java
if: steps.tag-on-main.outputs.on-main == 'true'
id: setup-jre
uses: actions/setup-java@v1
with:
java-version: "11"
architecture: x64

- name: Publish to maven
if: steps.tag-on-main.outputs.on-main == 'true'
run: |
./gradlew sonatypeCentralUpload
env:
Expand Down
Loading