Skip to content

Commit

Permalink
add a release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
bjansen-caps committed Nov 25, 2024
1 parent 6da061b commit 43c7029
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 6 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release CI

on:
release:
types:
- published

jobs:
build:

runs-on: ubuntu-latest


steps:
- uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin

- name: Build with Gradle
run: |
./gradlew -PideaVersion=${IDEA_VERSION} check buildPlugin
env:
- IDEA_VERSION: IC-2020.3

- name: Publish to Sonatype
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
run: ./gradlew publish -PossrhToken="${SONATYPE_USERNAME}" -PossrhTokenPassword="${SONATYPE_PASSWORD}" -PsigningKey="${SIGNING_KEY}" -PsigningPassword="${SIGNING_PASSWORD}"
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ apply plugin: 'java'
apply plugin: 'org.jetbrains.intellij'

compileJava {
sourceCompatibility = '17'
targetCompatibility = '17'
sourceCompatibility = '11'
targetCompatibility = '11'
}

intellij {
Expand All @@ -40,7 +40,7 @@ repositories {

dependencies {
implementation("org.antlr:antlr4-runtime:$antlr4Version") {
exclude group:'com.ibm.icu', module:'icu4j'
exclude group: 'com.ibm.icu', module: 'icu4j'
}
antlr "org.antlr:antlr4:$antlr4Version"
}
Expand Down Expand Up @@ -97,8 +97,8 @@ publishing {
maven {
url "https://oss.sonatype.org/${libraryVersion.contains("-SNAPSHOT") ? 'content/repositories/snapshots' : 'service/local/staging/deploy/maven2'}"
credentials {
username = findProperty("ossrhToken") as String
password = findProperty("ossrhTokenPassword") as String
username = findProperty("ossrhToken") as String
password = findProperty("ossrhTokenPassword") as String
}
}
}
Expand All @@ -110,7 +110,7 @@ signing {


javadoc {
if(JavaVersion.current().isJava9Compatible()) {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}

0 comments on commit 43c7029

Please sign in to comment.