Skip to content

Commit

Permalink
Create release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbie1977 authored Aug 9, 2024
1 parent a1a2829 commit 9d14b90
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build and Release JAR

on:
push:
branches:
- main
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest

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

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

- name: Build with Maven
run: mvn clean package

- name: Archive build artifacts
uses: actions/upload-artifact@v3
with:
name: neo4j2owl-jar
path: target/*.jar

release:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'release'

steps:
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: neo4j2owl-jar

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: neo4j2owl-jar/*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9d14b90

Please sign in to comment.