Update Build Action and Injection #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ main, ci-cd-improvements ] | |
pull_request: | |
jobs: | |
build: | |
name: Build and upload plugin artifact | |
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: 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 | |
- name: Upload built plugin | |
uses: actions/upload-artifact@v4 | |
with: | |
name: autoconfig-plugin-${{ steps.environment.outputs.version }} | |
path: build/distributions/pluginfiles/*/* |