Skip to content

Commit

Permalink
ci: better attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
triceo committed Dec 10, 2024
1 parent 5add8d6 commit 7575492
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 30 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ jobs:
fetch-depth: 0
ref: ${{ github.event.inputs.sourceBranch }}

- name: Delete release branch (if exists)
continue-on-error: true
run: git push -d origin $RELEASE_BRANCH_NAME

- name: Create release branch and switch to it
run: |
git config user.name "Timefold Release Bot"
git config user.email "[email protected]"
git checkout -b $RELEASE_BRANCH_NAME
- uses: actions/setup-java@v4
with:
java-version: '17'
Expand Down Expand Up @@ -83,6 +93,28 @@ jobs:
git add docs/src/antora.yml
find . -name 'pom.xml' | xargs git add
git commit -m "build: release version ${{ github.event.inputs.version }}"
git push origin $RELEASE_BRANCH_NAME
- name: Run JReleaser
uses: jreleaser/release-action@v2
env:
JRELEASER_DRY_RUN: ${{ github.event.inputs.dryRun }}
JRELEASER_PROJECT_VERSION: ${{ github.event.inputs.version }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.JRELEASER_GITHUB_TOKEN }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.JRELEASER_MAVEN_CENTRAL_TOKEN_USER }}
JRELEASER_MAVENCENTRAL_PASSWORD: ${{ secrets.JRELEASER_MAVEN_CENTRAL_TOKEN }}

- name: JReleaser release output
uses: actions/upload-artifact@v4
if: always()
with:
name: jreleaser-release
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
31 changes: 1 addition & 30 deletions jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,4 @@ release:
- build
- ci
contributors:
- "Timefold Release Bot"

deploy:
maven:
mavenCentral:
timefold:
active: ALWAYS
url: https://central.sonatype.com/api/v1/publisher
authorization: BASIC
# TODO Remove verifyPom tag, hack for https://github.com/jreleaser/jreleaser/issues/1397
verifyPom: false
stagingRepositories:
- "target/staging-deploy"
artifactOverrides:
- groupId: ai.timefold.solver
artifactId: timefold-solver-core
sourceJar: false
javadocJar: false
- groupId: ai.timefold.solver
artifactId: timefold-solver-spring-boot-starter
sourceJar: false
javadocJar: false
- groupId: ai.timefold.solver
artifactId: timefold-solver-ide-config
sourceJar: true
javadocJar: false
- groupId: ai.timefold.solver
artifactId: timefold-solver-webui
sourceJar: true
javadocJar: false
- "Timefold Release Bot"

0 comments on commit 7575492

Please sign in to comment.