Release #18
This file contains hidden or 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: Release | |
on: | |
workflow_dispatch: | |
env: | |
JAVA_VERSION: 17 | |
jobs: | |
release: | |
permissions: | |
contents: write | |
runs-on: windows-latest | |
steps: | |
- name: Generate GitHub App(webauthn4j-github-app-bot) Token | |
id: app-token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ secrets.BOT_APP_ID }} | |
private-key: ${{ secrets.BOT_PRIVATE_KEY }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
- name: Set up JDK ${{ env.JAVA_VERSION }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ env.JAVA_VERSION }} | |
cache: 'gradle' | |
- name: Switch to release | |
run: | | |
./gradlew switchToRelease | |
- name: Update versions in documents | |
run: | | |
./gradlew updateVersionsInDocuments | |
- name: Build with Gradle | |
run: | | |
./gradlew build javadoc asciidoc | |
- name: Commit changes | |
shell: bash | |
run: | | |
VERSION=$(grep "webAuthn4JSpringSecurityVersion" gradle.properties | cut -d'=' -f2) | |
git config user.name "webauthn4j-bot" | |
git config user.email "[email protected]" | |
git add . | |
git commit --allow-empty -m "Release ${VERSION}" | |
- name: Push commit | |
shell: bash | |
run: | | |
git push | |
- name: Tag commit | |
shell: bash | |
run: | | |
VERSION=$(grep "webAuthn4JSpringSecurityVersion" gradle.properties | cut -d'=' -f2) | |
git tag "${VERSION}.RELEASE" | |
- name: Push tag | |
shell: bash | |
run: | | |
VERSION=$(grep "webAuthn4JSpringSecurityVersion" gradle.properties | cut -d'=' -f2) | |
git push origin "${VERSION}.RELEASE" | |
- name: Publish to Maven Central | |
env: | |
MAVEN_CENTRAL_USER: ${{ secrets.MAVEN_CENTRAL_USER }} | |
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | |
PGP_SIGNING_KEY: ${{ secrets.PGP_SIGNING_KEY }} | |
PGP_SIGNING_KEY_PASSPHRASE: ${{ secrets.PGP_SIGNING_KEY_PASSPHRASE }} | |
run: | | |
./gradlew publishStandardPublicationToLocalStagingRepository jreleaserDeploy |