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 06a244f commit d5e3c50
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ on:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
lfs: true
fetch-tags: true
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
Expand All @@ -24,8 +23,8 @@ jobs:
id: environment
shell: bash
run: |
LATEST_TAG=$(git describe --tags --abbrev=0)
echo "latest_tag=$LATEST_TAG" >> $GITHUB_OUTPUT
VERSION=$(./gradlew printVersion -q --console=plain)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Build plugin
run: |
chmod +x gradlew
Expand All @@ -39,6 +38,6 @@ jobs:
- name: Upload built plugin
uses: actions/upload-artifact@v4
with:
name: autoconfig-plugin-${{ steps.environment.outputs.latest_tag }}
name: autoconfig-plugin-${{ steps.environment.outputs.version }}
path: build/distributions/pluginfiles/*/*

6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ patchPluginXml {
changeNotes = new File("metadata/changelog.html").text.findAll(bodyMatcher)?[0]
}

task printVersion {
doLast {
println(rootProject.version)
}
}

signPlugin {
certificateChain = System.getenv("CERTIFICATE_CHAIN")
privateKey = System.getenv("PRIVATE_KEY")
Expand Down

0 comments on commit d5e3c50

Please sign in to comment.