Skip to content

Commit a38606b

Browse files
authored
Create Test.yml
1 parent 5983576 commit a38606b

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/Test.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Gradle Plugin Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_tag:
7+
description: 'The release tag to upload the JAR to'
8+
required: true
9+
default: 'Preview-v1.0'
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
23+
- name: Set up JDK 17
24+
uses: actions/setup-java@v4
25+
with:
26+
java-version: '17'
27+
distribution: 'temurin'
28+
29+
- name: Setup Gradle
30+
uses: gradle/actions/setup-gradle@v4
31+
32+
- name: Build Plugin with Gradle
33+
run: ./gradlew buildPlugin
34+
35+
- name: Upload Plugin to GitHub Release
36+
uses: actions/upload-release-asset@v1
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
with:
40+
upload_url: https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ github.event.inputs.release_tag }}
41+
asset_path: ./build/libs/SecurityInspector-${{ github.event.inputs.release_tag }}.jar
42+
asset_name: SecurityInspector-${{ github.event.inputs.release_tag }}.jar
43+
asset_content_type: application/java-archive

0 commit comments

Comments
 (0)