Skip to content

Commit

Permalink
Merge pull request #69 from xiangtianyu/plugin-build-workflow
Browse files Browse the repository at this point in the history
Plugin build workflow
  • Loading branch information
myoss authored Aug 10, 2024
2 parents 3953a09 + 78ce2bc commit 3410061
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build-plugin-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build Plugin (Local)

on:
workflow_dispatch:
inputs:
version:
description: 'Plugin version'
required: true
default: '1.0.0'

jobs:
build:
runs-on: ubuntu-latest
environment:
name: local

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'

- name: Set Config
run: |
mkdir src/main/resources/config
touch src/main/resources/config/local.properties
echo "${{ vars.DEVPILOT_CONFIG }}" >> src/main/resources/config/local.properties
- name: Build plugin
run: ./gradlew buildPlugin

- name: Upload plugin artifact
uses: actions/upload-artifact@v2
with:
name: DevPilot-local
path: build/distributions/DevPilot-*.zip
40 changes: 40 additions & 0 deletions .github/workflows/build-plugin-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build Plugin (Production)

on:
workflow_dispatch:
inputs:
version:
description: 'Plugin version'
required: true
default: '1.0.0'

jobs:
build:
runs-on: ubuntu-latest
environment:
name: production

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'

- name: Set Config
run: |
mkdir src/main/resources/config
touch src/main/resources/config/local.properties
echo "${{ vars.DEVPILOT_CONFIG }}" >> src/main/resources/config/local.properties
- name: Build plugin
run: ./gradlew buildPlugin

- name: Upload plugin artifact
uses: actions/upload-artifact@v2
with:
name: DevPilot-production
path: build/distributions/DevPilot-*.zip
40 changes: 40 additions & 0 deletions .github/workflows/build-plugin-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build Plugin (Test)

on:
workflow_dispatch:
inputs:
version:
description: 'Plugin version'
required: true
default: '1.0.0'

jobs:
build:
runs-on: ubuntu-latest
environment:
name: test

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'

- name: Set Config
run: |
mkdir src/main/resources/config
touch src/main/resources/config/local.properties
echo "${{ vars.DEVPILOT_CONFIG }}" >> src/main/resources/config/local.properties
- name: Build plugin
run: ./gradlew buildPlugin

- name: Upload plugin artifact
uses: actions/upload-artifact@v2
with:
name: DevPilot-test
path: build/distributions/DevPilot-*.zip

0 comments on commit 3410061

Please sign in to comment.