Skip to content

v9.13.0 Support mark as read by token API #56

v9.13.0 Support mark as read by token API

v9.13.0 Support mark as read by token API #56

Workflow file for this run

# https://docs.github.com/en/actions/publishing-packages/publishing-java-packages-with-gradle
name: Publish package to the Maven Central Repository
on:
release:
types: [ published ]
workflow_dispatch:
inputs:
version:
description: 'The version to release'
required: true
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
submodules: true
- name: Set up Java
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
java-version: '17'
distribution: 'temurin'
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
- name: Show Version Number
id: version
run: |
echo "Version=${{ github.event.release.tag_name }}"
- name: Build package
run: |
./gradlew build
- name: Set version
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
VERSION=${{ github.event.inputs.version }}
else
VERSION=${{ github.event.release.tag_name }}
fi
VERSION=${VERSION#v}
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Publish package
run: |
./gradlew --no-daemon --stacktrace --max-workers=1 --info publish closeAndReleaseStagingRepository
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME_H }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN_H }}
SDK_VERSION: ${{ env.VERSION }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.GPG_KEY_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSWORD }}
- name: Create GitHub Issue on Failure
if: failure()
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: |
const { owner, repo } = context.repo;
const version = process.env.VERSION;
const issueTitle = `Release job for ${version} failed`;
const issueBody = `The release job failed. Please check the [workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for more details.`;
const assignees = [context.actor];
await github.rest.issues.create({
owner,
repo,
title: issueTitle,
body: issueBody,
assignees
});