docs: README. #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Legacy Lands Library | |
on: | |
push: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
packages: write | |
actions: read | |
jobs: | |
shadowJar: | |
name: shadow | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Java JDK | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: '21' | |
distribution: 'graalvm' | |
- name: Make gradlew executable | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew shadowJar | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_USERNAME: ${{ github.actor }} | |
isGitHubActions: "true" | |
- name: Set outputs | |
id: short_sha | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Get Repository Name | |
uses: MariachiBear/[email protected] | |
- name: Publish to GitHub Packages | |
run: ./gradlew publish -PisGitHubActions=true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_USERNAME: ${{ github.actor }} | |
- uses: actions/[email protected] | |
with: | |
name: ${{ steps.repo-name.outputs.repository-name }} ${{ steps.short_sha.outputs.sha_short }} -annotation | |
path: | | |
annotation/build/libs/*.jar | |
- uses: actions/[email protected] | |
with: | |
name: ${{ steps.repo-name.outputs.repository-name }} ${{ steps.short_sha.outputs.sha_short }} -cache | |
path: | | |
cache/build/libs/*.jar | |
- uses: actions/[email protected] | |
with: | |
name: ${{ steps.repo-name.outputs.repository-name }} ${{ steps.short_sha.outputs.sha_short }} -configuration | |
path: | | |
configuration/build/libs/*.jar | |
- uses: actions/[email protected] | |
with: | |
name: ${{ steps.repo-name.outputs.repository-name }} ${{ steps.short_sha.outputs.sha_short }} -commons | |
path: | | |
commons/build/libs/*.jar | |
- uses: actions/[email protected] | |
with: | |
name: ${{ steps.repo-name.outputs.repository-name }} ${{ steps.short_sha.outputs.sha_short }} -mongodb | |
path: | | |
mongodb/build/libs/*.jar |