Skip to content

github actions

github actions #3

Workflow file for this run

name: Build JAR with Maven
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- name: Build with Maven
run: mvn clean package -f /JGNN/pom.xml
- name: Archive JAR
uses: actions/upload-artifact@v2
with:
name: java-app
path: target/*.jar
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v1.3.${{ github.run_number }}-nightly
release_name: Release v1.3.${{ github.run_number }}-nightly
draft: false
prerelease: true
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/JGNN.jar
asset_name: your-app.jar
asset_content_type: application/java-archive