Skip to content

Commit

Permalink
ci: cleanup workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jponge committed May 29, 2024
1 parent 0b11564 commit 665a14c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
12 changes: 6 additions & 6 deletions .build/justfile-for-release
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ pre-release: init-git
@echo "Pre-release verifications"
jbang .build/PreRelease.java --token=${RELEASE_TOKEN} --release-version=${RELEASE_VERSION}
@echo "Bump project version to ${RELEASE_VERSION}"
./mvnw --settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress versions:set -DnewVersion=${RELEASE_VERSION} -DgenerateBackupPoms=false
./mvnw --settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress versions:set -DnewVersion=${RELEASE_VERSION} -DgenerateBackupPoms=false -pl bom
./mvnw --batch-mode --no-transfer-progress versions:set -DnewVersion=${RELEASE_VERSION} -DgenerateBackupPoms=false
./mvnw --batch-mode --no-transfer-progress versions:set -DnewVersion=${RELEASE_VERSION} -DgenerateBackupPoms=false -pl bom
jbang .build/UpdateDocsAttributesFiles.java --mutiny-version=${RELEASE_VERSION}
@echo "Check that the project builds (no tests)"
./mvnw --settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress clean install -Prelease -DskipTests
./mvnw --batch-mode --no-transfer-progress clean install -Prelease -DskipTests
@echo "Bump workshop examples to ${RELEASE_VERSION}"
.build/update-workshop-target-version.sh "${RELEASE_VERSION}"
@echo "Check that the website builds"
Expand All @@ -41,10 +41,10 @@ release: pre-release
git commit -am "chore(release): release Mutiny ${RELEASE_VERSION}"
git push
@echo "Call JReleaser"
./mvnw -settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress -Pjreleaser jreleaser:full-release -pl :mutiny-project
./mvnw --batch-mode --no-transfer-progress -Pjreleaser jreleaser:full-release -pl :mutiny-project
@echo "Bump to 999-SNAPSHOT and push upstream"
./mvnw --settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress versions:set -DnewVersion=999-SNAPSHOT -DgenerateBackupPoms=false
./mvnw --settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress versions:set -DnewVersion=999-SNAPSHOT -DgenerateBackupPoms=false -pl bom
./mvnw --batch-mode --no-transfer-progress versions:set -DnewVersion=999-SNAPSHOT -DgenerateBackupPoms=false
./mvnw --batch-mode --no-transfer-progress versions:set -DnewVersion=999-SNAPSHOT -DgenerateBackupPoms=false -pl bom
git commit -am "chore(release): set development version to 999-SNAPSHOT"
git push

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ jobs:
server-id: 'oss.sonatype'
server-username: 'MAVEN_DEPLOY_USERNAME'
server-password: 'MAVEN_DEPLOY_TOKEN'
gpg-private-key: ${{secrets.MAVEN_GPG_PRIVATE_KEY}}
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: 'MAVEN_GPG_PASSPHRASE'
- name: Install just
uses: taiki-e/install-action@just
- name: Test and deploy snapshots
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_DEPLOY_USERNAME: ${{secrets.MAVEN_DEPLOY_USERNAME}}
MAVEN_DEPLOY_TOKEN: ${{secrets.MAVEN_DEPLOY_TOKEN}}
MAVEN_GPG_PASSPHRASE: ${{secrets.MAVEN_GPG_PASSPHRASE}}
MAVEN_DEPLOY_USERNAME: ${{ secrets.MAVEN_DEPLOY_USERNAME }}
MAVEN_DEPLOY_TOKEN: ${{ secrets.MAVEN_DEPLOY_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
run: |
VERSION=$(./mvnw -q exec:exec -Dexec.executable=echo -Dexec.args='${project.version}' -pl :mutiny-project)
if [[ ${VERSION} == *SNAPSHOT ]]; then
# echo "🚀 Run the tests"
# ./mvnw --no-transfer-progress -s .build/maven-ci-settings.xml -B clean verify
echo "🚀 Run the tests"
./mvnw --no-transfer-progress -s .build/maven-ci-settings.xml -B clean verify
echo "🚀 Deploy the snapshots"
just -f .build/justfile-for-release -d . deploy-to-maven-central
else
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/push-release-to-maven-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
server-id: 'oss.sonatype'
server-username: 'MAVEN_DEPLOY_USERNAME'
server-password: 'MAVEN_DEPLOY_TOKEN'
gpg-private-key: ${{secrets.MAVEN_GPG_PRIVATE_KEY}}
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: 'MAVEN_GPG_PASSPHRASE'
- name: Install just
uses: taiki-e/install-action@just
- name: Deploy to Maven Central
env:
MAVEN_DEPLOY_USERNAME: ${{secrets.MAVEN_DEPLOY_USERNAME}}
MAVEN_DEPLOY_TOKEN: ${{secrets.MAVEN_DEPLOY_TOKEN}}
MAVEN_GPG_PASSPHRASE: ${{secrets.MAVEN_GPG_PASSPHRASE}}
MAVEN_DEPLOY_USERNAME: ${{ secrets.MAVEN_DEPLOY_USERNAME }}
MAVEN_DEPLOY_TOKEN: ${{ secrets.MAVEN_DEPLOY_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
run: just -f .build/justfile-for-release -d . deploy-to-maven-central
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
server-id: 'oss.sonatype'
server-username: 'MAVEN_DEPLOY_USERNAME'
server-password: 'MAVEN_DEPLOY_TOKEN'
gpg-private-key: ${{secrets.MAVEN_GPG_PRIVATE_KEY}}
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: 'MAVEN_GPG_PASSPHRASE'
- name: Install just
uses: taiki-e/install-action@just
Expand All @@ -61,9 +61,9 @@ jobs:
run: .build/install-mkdocs-deps.sh
- name: Perform the release steps
env:
MAVEN_DEPLOY_USERNAME: ${{secrets.MAVEN_DEPLOY_USERNAME}}
MAVEN_DEPLOY_TOKEN: ${{secrets.MAVEN_DEPLOY_TOKEN}}
MAVEN_GPG_PASSPHRASE: ${{secrets.MAVEN_GPG_PASSPHRASE}}
MAVEN_DEPLOY_USERNAME: ${{ secrets.MAVEN_DEPLOY_USERNAME }}
MAVEN_DEPLOY_TOKEN: ${{ secrets.MAVEN_DEPLOY_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
run: |
curl -s "https://get.sdkman.io" | bash
source ~/.sdkman/bin/sdkman-init.sh && sdk install jbang
Expand Down

0 comments on commit 665a14c

Please sign in to comment.