Skip to content

Commit

Permalink
Simplify CI pipelines and add CLI releasing
Browse files Browse the repository at this point in the history
  • Loading branch information
ryru committed Sep 14, 2024
1 parent 4cb44b7 commit b6f9917
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 55 deletions.
22 changes: 5 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,21 @@
name: Build project
name: Build (assemble & check)

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:

- name: Check out project
uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v4
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
architecture: x64

- name: Set up Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5

- name: Check project
run: ./gradlew check

- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
- name: Build project
run: ./gradlew build
29 changes: 29 additions & 0 deletions .github/workflows/releaseCli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release CLI app

on:
push:
tags:
- "v*.*.*"

jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
architecture: x64
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
- name: Assemble project distribution
run: ./gradlew :app:assembleDist
- name: Prepare release
uses: softprops/action-gh-release@v2
with:
draft: true
files: |
app/build/distributions/dga.tar
app/build/distributions/dga.zip
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Connector Plugin to Gradle Plugin Platform
name: Release Connector Plugin

on:
workflow_dispatch:
Expand All @@ -8,22 +8,15 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:

- name: Check out project
uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v4
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
architecture: x64

- name: Set up Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5

uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
- name: Validate connector plugin
run: ./gradlew :connector-plugin:validatePlugins

- name: Publish connector plugin
run: ./gradlew :connector-plugin:publishPlugins -Pgradle.publish.key=${{ secrets.GRADLE_PLUGIN_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PLUGIN_SECRET }}
27 changes: 0 additions & 27 deletions .github/workflows/verify.yml

This file was deleted.

0 comments on commit b6f9917

Please sign in to comment.