Skip to content

Commit

Permalink
Update Build Action and Injection
Browse files Browse the repository at this point in the history
  • Loading branch information
nailujx86 committed Jun 21, 2024
1 parent ed2fdf7 commit 348b967
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 25 deletions.
31 changes: 6 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,24 @@
name: CI
name: Build

on:
push:
branches: [ main, ci-cd-improvements ]
pull_request:


jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
lfs: true
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: adopt-hotspot
- name: Set Variables
id: environment
shell: bash
run: |
./gradlew printVersion --console=plain -q
echo "version=$(./gradlew printVersion --console=plain -q)" >> $GITHUB_OUTPUT
- name: Build plugin
run: |
chmod +x gradlew
./gradlew check buildPlugin
- name: Build Plugin
id: build
uses: ./.github/workflows/buildPlugin.yml
- name: Unpack unsigned plugin for repackaging
shell: bash
run: |
cd ${{ github.workspace }}/build/distributions
unzip *.zip -d pluginfiles
- name: Upload built plugin
uses: actions/upload-artifact@v4
with:
name: autoconfig-plugin-${{ steps.environment.outputs.version }}
path: build/distributions/pluginfiles/*/*

name: autoconfig-plugin-${{ steps.build.outputs.version }}
path: build/distributions/pluginfiles/*/*
39 changes: 39 additions & 0 deletions .github/workflows/buildPlugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
workflow_call:
outputs:
version:
value: ${{ jobs.buildPlugin.outputs.version }}


jobs:
buildPlugin:
runs-on: ubuntu-24.04
outputs:
version: ${{ steps.environment.outputs.version }}
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
lfs: true
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: adopt-hotspot
- name: Run Gradle Check # also ensures gradle is downloaded
run: |
chmod +x gradlew
./gradlew check
- name: Set Variables
id: environment
shell: bash
run: echo "version=$(./gradlew printVersion --console=plain -q)" >> $GITHUB_OUTPUT
- name: Build plugin
run: ./gradlew buildPlugin
- name: Unpack unsigned plugin for repackaging
shell: bash
run: |
cd ${{ github.workspace }}/build/distributions
unzip *.zip -d pluginfiles

0 comments on commit 348b967

Please sign in to comment.