Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/create-draft-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Fetch Latest Release
id: get-latest-release
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const latestRelease = await github.rest.repos.getLatestRelease({
Expand All @@ -64,7 +64,7 @@ jobs:

- name: Calculate New Version
id: calculate-version
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const latestTag = '${{ steps.get-latest-release.outputs.latest_tag }}';
Expand All @@ -85,7 +85,7 @@ jobs:

- name: Generate Release Notes
id: generate-release-notes
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const { data: releaseNotes } = await github.rest.repos.generateReleaseNotes({
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Set up JDK 8
uses: actions/setup-java@v3
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
java-version: '8'
distribution: 'temurin'
Expand Down
28 changes: 16 additions & 12 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,43 +12,47 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0

- name: Set up Java
uses: actions/setup-java@v4
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
java-version: '8'
distribution: 'temurin'

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6
uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.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 }}
VERSION="${{ github.event.inputs.version }}"
else
VERSION=${{ github.event.release.tag_name }}
VERSION="${{ github.event.release.tag_name }}"
fi
# Strip the "v" prefix from the tag (vX.Y.Z -> X.Y.Z)
VERSION="${VERSION#v}"
echo "VERSION=$VERSION" >> $GITHUB_ENV

- name: Build package
run: |
./gradlew build
env:
SDK_VERSION: ${{ env.VERSION }}

- name: Publish package
run: |
./gradlew --no-daemon --stacktrace --max-workers=1 --info publish closeAndReleaseStagingRepositories
./gradlew --no-daemon --stacktrace --max-workers=1 --info publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
SDK_VERSION: ${{ env.VERSION }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.GPG_KEY_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
Expand Down
12 changes: 9 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ plugins {
id 'com.linecorp.gradle.license-git' version '0.1.0'
}

version = System.getenv("SDK_VERSION") ?: (
"0.1.40" + (project.hasProperty("release") ? "" : "-SNAPSHOT")
)
allprojects {
version = System.getenv("SDK_VERSION") ?: (
"0.1.40" + (project.hasProperty("release") ? "" : "-SNAPSHOT")
)
}

subprojects {
apply plugin: 'java'
Expand All @@ -30,6 +32,10 @@ subprojects {
nexusPublishing {
repositories {
sonatype {
// OSSRH (oss.sonatype.org) was sunset on 2025-06-30; publish via the
// OSSRH Staging API compatibility service of the Central Portal instead
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
username.set(System.getenv("MAVEN_USERNAME"))
password.set(System.getenv("MAVEN_PASSWORD"))
}
Expand Down
10 changes: 0 additions & 10 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,6 @@ publishing {
}
}
}
repositories {
maven {
name = 'OSSRH'
url = uri('https://oss.sonatype.org/service/local/staging/deploy/maven2/')
credentials {
username = System.getenv('MAVEN_USERNAME')
password = System.getenv('MAVEN_PASSWORD')
}
}
}
}

def signingKeyId = rootProject.findProperty('signingKeyId')
Expand Down
Loading