40 lines
985 B
YAML
40 lines
985 B
YAML
|
name: "Build and publish releases"
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
tags: "v*"
|
||
|
|
||
|
jobs:
|
||
|
release:
|
||
|
if: github.repository_owner == 'mc'
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v3
|
||
|
- name: Set up JDK 17
|
||
|
uses: https://github.com/actions/setup-java@v3
|
||
|
with:
|
||
|
java-version: '17'
|
||
|
distribution: 'temurin'
|
||
|
|
||
|
- name: "build"
|
||
|
run: |
|
||
|
./gradlew build
|
||
|
|
||
|
- name: "move releases"
|
||
|
run: |
|
||
|
mkdir release
|
||
|
mv build/libs/*.jar release
|
||
|
|
||
|
- name: "publish release"
|
||
|
uses: https://code.forgejo.org/actions/forgejo-release@v1
|
||
|
with:
|
||
|
direction: upload
|
||
|
release-dir: release
|
||
|
token: ${{ secrets.TOKEN }}
|
||
|
|
||
|
- name: "publish to maven"
|
||
|
env:
|
||
|
MAVEN_REPO_URL: "https://git.kallestruik.nl/api/packages/mc/maven"
|
||
|
MAVEN_REPO_TOKEN: ${{ secrets.TOKEN }}
|
||
|
run: |
|
||
|
./gradlew publishReleasePublicationToMavenRepository
|