Skip to content

Publish

Publish #20

Workflow file for this run

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:
sonatype_passphrase: ${{ secrets.SONATYPE_PASSPHRASE }}
sonatype_secret_key: ${{ secrets.SONATYPE_SECRET_KEY }}
sonatype_password: ${{ secrets.SONATYPE_PASSWORD }}
sonatype_username: ${{ secrets.SONATYPE_USERNAME }}
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 Project
run: |
./gradlew clean
- name: Stage Artifact
run: |
./gradlew publish
- name: Full Release
run: |
./gradlew jreleaserFullRelease --dry-run
- name: Check Status
run: |
STATUS=$?
if [ $STATUS -ne 0 ]; then
echo "Error occurred during publishing"
exit $STATUS
fi