-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
148 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# These are supported funding model platforms | ||
|
||
github:xemantic |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Build branch | ||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
pull_request: | ||
branches-ignore: | ||
- main | ||
|
||
jobs: | ||
build_branch: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/[email protected] | ||
|
||
- name: Setup Java | ||
uses: actions/[email protected] | ||
with: | ||
distribution: 'temurin' | ||
java-version: 23 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/[email protected] | ||
|
||
- name: Build | ||
run: ./gradlew build |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Build main | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build_main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/[email protected] | ||
|
||
- name: Setup Java | ||
uses: actions/[email protected] | ||
with: | ||
distribution: 'temurin' | ||
java-version: 23 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/[email protected] | ||
|
||
- name: Build | ||
run: ./gradlew build sourcesJar dokkaGeneratePublicationHtml publish | ||
env: | ||
ORG_GRADLE_PROJECT_githubActor: ${{ secrets.GITHUBACTOR }} | ||
ORG_GRADLE_PROJECT_githubToken: ${{ secrets.GITHUBTOKEN }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Build release | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
build_release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# Give the default GITHUB_TOKEN write permission to commit and push the | ||
# added or changed files to the repository. | ||
contents: write | ||
steps: | ||
- name: Write release version | ||
run: | | ||
VERSION=${GITHUB_REF_NAME#v} | ||
echo Version: $VERSION | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
- name: Checkout sources | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Java | ||
uses: actions/[email protected] | ||
with: | ||
distribution: 'temurin' | ||
java-version: 23 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/[email protected] | ||
|
||
- name: Build | ||
env: | ||
ORG_GRADLE_PROJECT_githubActor: ${{ secrets.GITHUBACTOR }} | ||
ORG_GRADLE_PROJECT_githubToken: ${{ secrets.GITHUBTOKEN }} | ||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} | ||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} | ||
ORG_GRADLE_PROJECT_sonatypeUser: ${{ secrets.SONATYPE_USER }} | ||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} | ||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | ||
run: ./gradlew -Pversion=$VERSION build sourcesJar dokkaGeneratePublicationHtml publishToSonatype closeAndReleaseSonatypeStagingRepository | ||
|
||
- name: Find branch from tag | ||
id: find-branch | ||
env: | ||
TAG_NAME: ${{ github.event.release.tag_name }} | ||
run: | | ||
BRANCH=$(git branch -r --contains $TAG_NAME | grep -v '\->' | sed 's/origin\///' | head -n 1) | ||
if [ -z "$BRANCH" ]; then | ||
echo "Branch not found for tag $TAG" | ||
exit 1 | ||
fi | ||
echo Branch: $BRANCH | ||
echo "BRANCH=$BRANCH" >> $GITHUB_ENV | ||
- name: Checkout branch HEAD | ||
run: git checkout ${BRANCH} | ||
|
||
# - name: Update README | ||
# run: sed -i "s/com\.xemantic\.anthropic:anthropic-sdk-kotlin:[0-9]\+\(\.[0-9]\+\)*\>/com.xemantic.anthropic:anthropic-sdk-kotlin:$VERSION/g" README.md | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/[email protected] | ||
with: | ||
token: ${{ secrets.WORKFLOW_SECRET }} | ||
commit-message: README.md gradle dependencies update to ${{ env.VERSION }} | ||
title: PR Action - README.md gradle dependencies update to ${{ env.VERSION }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: GitHub Actions Version Updater | ||
|
||
# Controls when the action will run. | ||
on: | ||
schedule: | ||
# Automatically run on every Sunday | ||
- cron: '0 0 * * 0' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Git checkout | ||
uses: actions/[email protected] | ||
with: | ||
# [Required] Access token with `workflow` scope. | ||
token: ${{ secrets.WORKFLOW_SECRET }} | ||
|
||
- name: Run GitHub Actions Version Updater | ||
uses: saadmk11/[email protected] | ||
with: | ||
# [Required] Access token with `workflow` scope. | ||
token: ${{ secrets.WORKFLOW_SECRET }} |