ollama4j/.github/workflows/release-jar.yml
2024-03-02 20:27:37 +05:30

43 lines
961 B
YAML

name: Release JAR
on:
push:
tags:
- '**'
permissions:
contents: read
id-token: write
packages: write
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
repository-projects: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Build with Maven
run: mvn -B clean install package --file pom.xml
- name: Release Assets
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: startsWith(github.ref, 'refs/tags/')
with:
files: target/*.jar