-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Build Action and add Release Action
- Loading branch information
Showing
7 changed files
with
155 additions
and
35 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
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/*/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
on: | ||
workflow_call: | ||
outputs: | ||
version: | ||
value: ${{ jobs.buildPlugin.outputs.version }} | ||
artifactName: | ||
value: "pluginArtifact" | ||
|
||
jobs: | ||
buildPlugin: | ||
name: Build plugin | ||
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: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
id: artifact-upload | ||
with: | ||
path: ${{ github.workspace }}/build/distributions | ||
name: pluginArtifact | ||
overwrite: true | ||
retention-days: 1 |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build: | ||
name: Build, sign and publish plugin | ||
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: Set release flag | ||
id: release | ||
shell: bash | ||
run: echo "preRelease=${{ github.event.release.prerelease}}" >> $GITHUB_OUTPUT | ||
- name: Build plugin, sign plugin and publish plugin | ||
run: ./gradlew buildPlugin signPlugin publishPlugin -PpreRelease=${{ steps.release.outputs.preRelease }} | ||
env: | ||
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} | ||
- name: Sign and publish plugin | ||
run: ./gradlew signPlugin publishPlugin -PpreRelease=${{ steps.release.outputs.preRelease }} | ||
env: | ||
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} | ||
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }} | ||
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | ||
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
# Autoconfig Plugin Properties | ||
pluginVersion = 0.0.2 | ||
preRelease = false | ||
hidden = true | ||
pluginGroup = de.gebit.plugins.autoconfig | ||
|
||
# IntelliJ Plugin Build Support | ||
kotlin.stdlib.default.dependency = false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,7 @@ | |
<id>de.gebit.plugins.autoconfig</id> | ||
<name>Autoconfig</name> | ||
<vendor email="[email protected]" url="https://github.com/GEBIT/autoconfig-intellij-plugin">GEBIT Solutions GmbH</vendor> | ||
|
||
<version>0.0.1</version> | ||
|
||
<idea-version since-build="232.1"/> | ||
|
||
<depends>com.intellij.modules.json</depends> | ||
|