Skip to content

Merge release/1.x into main #63

Merge release/1.x into main

Merge release/1.x into main #63

name: Generate Release
on:
push:
branches:
- main
- release/1.x
workflow_dispatch:
concurrency: release
permissions:
contents: write
issues: write
checks: write
jobs:
generate-release:
runs-on: ubuntu-latest
permissions:
issues: write
contents: write
packages: write
pull-requests: write
id-token: write
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.BOT_ID }}
private-key: ${{ secrets.BOT_SK }}
- uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "adopt"
- name: Install system-wide LibSodium
run: sudo apt-get install -y libsodium-dev
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Initialize submodule, generate jars, and build (including tests)
run: chmod +x initialize.sh && ./initialize.sh
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup NPM packages
run: npm install --save @semantic-release/git @semantic-release/github @google/semantic-release-replace-plugin @semantic-release/exec
- name: Semantic Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Prepare files
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: ./gradlew publish
- name: Publish to Maven Central
if: github.ref == 'refs/heads/release/1.x'
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: ./gradlew publishToMavenCentralPortal
- name: Merge Release -> Trunk
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f
if: github.ref == 'refs/heads/release/1.x'
with:
type: now
from_branch: release/1.x
target_branch: main
github_token: ${{ steps.app-token.outputs.token }}