Skip to content

Commit

Permalink
[minor] BLE-29: pipeline support
Browse files Browse the repository at this point in the history
  • Loading branch information
jrsmth committed Jan 15, 2025
1 parent 513a64b commit 21528ab
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: main
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
release:
name: release
permissions:
packages: write
contents: write
uses: ./.github/workflows/steps/step-release.yaml
merge:
needs: release
name: merge
permissions:
contents: write
uses: ./.github/workflows/steps/step-merge.yaml
17 changes: 17 additions & 0 deletions .github/workflows/steps/step-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: merge
on:
workflow_call:
jobs:
merge:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Merge into Develop ➡️
uses: devmasx/merge-branch@master
with:
type: now
from_branch: main
target_branch: develop
message: Merge version bump into develop
github_token: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/steps/step-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: release
on:
workflow_call:
jobs:
release:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Set-up Java ☕
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 21
- name: Set-up Gradle 🔨
uses: gradle/actions/setup-gradle@v3
- name: Set-up Git 🐵
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Release 🏷️
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew release
20 changes: 20 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
`version-catalog`
`maven-publish`
id("net.researchgate.release") version "3.0.2"
}

repositories {
Expand All @@ -14,10 +15,29 @@ catalog {
}
}

tasks.getByName<Jar>("jar") {
enabled = true
}

release {
buildTasks.add("publish")
}

publishing {
publications {
create<MavenPublication>("maven") {
from(components["versionCatalog"])
}
}

repositories {
maven {
name = "githubPackages"
url = uri("https://maven.pkg.github.com/bible-game/version")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
}
}
}
}

0 comments on commit 21528ab

Please sign in to comment.