Publish #25
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
permissions: | |
checks: write | |
contents: write | |
pull-requests: write | |
statuses: write | |
id-token: write | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- .speakeasy/gen.lock | |
workflow_dispatch: {} | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
env: | |
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
SIGNINGPASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} | |
SIGNINGKEY: ${{ secrets.GPG_SECRET_KEY }} | |
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_PASSWORD: ${{ secrets.MAVENCENTRAL_PASSWORD }} | |
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_USERNAME: ${{ secrets.MAVENCENTRAL_USERNAME }} | |
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
cache: 'gradle' | |
- name: Verify Config | |
run: | | |
./gradlew jreleaserConfig | |
- name: Clean & Build Project | |
run: | | |
./gradlew clean build --no-daemon | |
- name: Stage Artifact | |
run: | | |
./gradlew publish --no-daemon | |
- name: Dry Run | |
run: | | |
./gradlew jreleaserFullRelease --dry-run | |
- name: Full Release | |
run: | | |
./gradlew jreleaserFullRelease --no-daemon --debug | |
- name: Check Status | |
run: | | |
STATUS=$? | |
if [ $STATUS -ne 0 ]; then | |
echo "Error occurred during publishing" | |
exit $STATUS | |
fi |