Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
deusaquilus committed Jul 5, 2024
1 parent 20a0a56 commit 25a83cc
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI

on: [pull_request, push]

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: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- run: |
docker-compose build && docker-compose run --rm --service-ports setup;
./gradlew clean build --stacktrace -PisCI -Pnosign
46 changes: 46 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release

on:
workflow_dispatch

jobs:
create_staging_repository:
runs-on: ubuntu-latest
name: Create staging repository
outputs:
repository_id: ${{ steps.create.outputs.repository_id }}
steps:
- id: create
uses: nexus-actions/create-nexus-staging-repo@main
with:
username: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }}
password: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}
staging_profile_id: ${{ secrets.SONATYPE_PROFILE_ID }}
# Defaults to the https://oss.sonatype.org, not https://s01.oss.sonatype.org
base_url: https://s01.oss.sonatype.org/service/local/
description: ${{ github.repository }}/${{ github.workflow }}#${{ github.run_number }}

release:
runs-on: ubuntu-latest
needs: [create_staging_repository]
env:
SONATYPE_REPOSITORY_ID: ${{ needs.create_staging_repository.outputs.repository_id }}
SONATYPE_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }}
SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}
NEW_SIGNING_KEY_ID_BASE64: ${{ secrets.NEW_SIGNING_KEY_ID_BASE64 }}
NEW_SIGNING_KEY_ID_BASE64_PASS: ${{ secrets.NEW_SIGNING_KEY_ID_BASE64_PASS }}
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Publish Library
run: ./gradlew clean build :terpal-runtime:publish :terpal-plugin-kotlin:publish :terpal-plugin-gradle:publish -PisCI -no-daemon --stacktrace
- name: Publish Gradle plugin
run: ./gradlew :terpal-plugin-gradle:publishPlugins -PisCI -no-daemon --stacktrace

0 comments on commit 25a83cc

Please sign in to comment.