Skip to content

Commit

Permalink
Create Github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dsavelev committed Oct 3, 2024
1 parent 237fc4f commit 27a7efd
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build and create an artifact

on:
pull_request:
types:
- opened
- synchronize
- reopened
- labeled

jobs:
build_and_test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'oracle'

- name: Build project with Maven
run: mvn -B package --file pom.xml

- uses: actions/upload-artifact@v4
with:
name: Package
path: target/neon-plugins.jar
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Create release artifact

on:
release:
types:
- published

jobs:
build_and_test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'oracle'

- name: Build project with Maven
run: mvn -B package --file pom.xml

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_name: 'neon-plugins.jar'
asset_path: 'target/neon-plugins.jar'
asset_content_type: 'application/java-archive'

0 comments on commit 27a7efd

Please sign in to comment.