patch: fix artifact location #14
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: "Build and Deploy [development]" | |
on: | |
push: | |
branches: [development] | |
jobs: | |
build: | |
name: "Build and Deploy [development]" | |
if: ${{ github.ref != 'refs/heads/master' && !contains(github.event.head_commit.message, '[skip ci]') }} | |
# Set up the OS | |
runs-on: ubuntu-latest | |
env: | |
# Sonatype Credentials & GitHub token | |
SONATYPE_USERNAME: '${{ secrets.SONATYPE_USERNAME }}' | |
SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASSWORD }}' | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
PUBLIC_KEY: '${{ secrets.PUBLIC_KEY }}' | |
SIGNING_KEY: '${{ secrets.SIGNING_KEY }}' | |
SIGNING_PASSWORD: '${{ secrets.SIGNING_PASSWORD }}' | |
# Set environment | |
ENV: 'dev' | |
steps: | |
# Checkout the Code | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
# Set up git hashes environment variables | |
- name: Git Hashes | |
uses: Im-Fran/[email protected] | |
# Set up the JDK | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: corretto | |
java-version: 21 | |
# Clean, Test, Publish and Build (in that order to save the artifact to the action) | |
- name: Build with Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: clean test shadowJar dokkaHtml publish sonatypeCentralUpload | |
# Now we store the artifact in the action | |
- name: Upload the artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: SimpleCoreAPI | |
path: ./build/libs/simplecoreapi.jar |