fix jar not having all api packages #6
Workflow file for this run
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: Upload Release Artifacts | |
on: | |
push: | |
tags: [ '*' ] | |
jobs: | |
init: | |
runs-on: ubuntu-latest | |
outputs: | |
REPOSITORY_NAME: ${{ steps.setup.outputs.REPOSITORY_NAME }} | |
BUILD_TIME: ${{ steps.setup.outputs.BUILD_TIME }} | |
steps: | |
- name: Setup Environment | |
id: setup | |
run: | | |
echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/}" >> $GITHUB_OUTPUT | |
echo BUILD_TIME=$(date '+%y.%m%d.%H%M') >> $GITHUB_OUTPUT | |
publish: | |
needs: | |
- init | |
env: | |
JAVA_VERSION: 21 | |
TAG: ${{ github.ref_name }} | |
BUILD_TIME: ${{ needs.init.outputs.BUILD_TIME }} | |
BUILD_NUMBER: ${{ github.run_number }} | |
MAVEN_UPLOAD_URL: ${{ secrets.MAVEN_UPLOAD_URL }} | |
MAVEN_UPLOAD_USERNAME: ${{ secrets.MAVEN_UPLOAD_USERNAME }} | |
MAVEN_UPLOAD_PASSWORD: ${{ secrets.MAVEN_UPLOAD_PASSWORD }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ env.JAVA_VERSION }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'microsoft' | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: Grant execute permission for gradlew | |
run: chmod +x ./gradlew | |
- name: Build with Gradle | |
env: | |
BUILD_TIME: ${{ steps.current-time.outputs.formattedTime }} | |
run: ./gradlew assemble --rerun-tasks | |
- name: Publish (Maven) | |
run: ./gradlew publish | |
- name: Publish (GitHub Releases) | |
id: publish_github | |
uses: Kir-Antipov/mc-publish@995edadc13559a8b28d0b7e6571229f067ec7659 | |
with: | |
github-token: ${{ github.token }} | |
version: ${{ env.TAG }} | |
version-type: beta | |
files: | | |
build/libs/*.jar |