Skip to content

Merge pull request #211 from utarwyn/feature-custom-ui #1

Merge pull request #211 from utarwyn/feature-custom-ui

Merge pull request #211 from utarwyn/feature-custom-ui #1

Workflow file for this run

name: Publish
on:
push:
branches: [ master, next ]
paths-ignore:
- '*.md'
- '.github/**/*.yml'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
publish:
runs-on: ubuntu-latest
name: Publish to Maven repository
steps:
- name: Checkout Git repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Restore Gradle cache
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
run: |
chmod +x gradlew
./gradlew build --stacktrace
- name: Publish to Personal Maven repository
run: ./gradlew publishApiPublicationToPersonalRepository publishPluginPublicationToPersonalRepository --stacktrace
env:
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
- name: Publish to GitHub Packages Maven repository
run: ./gradlew publishApiPublicationToGitHubPackagesRepository publishPluginPublicationToGitHubPackagesRepository --stacktrace
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Archive plugin jars on GitHub
uses: actions/upload-artifact@master
with:
name: EnderContainers plugin jars
path: |
api/build/libs/*.jar
plugin/build/libs/EnderContainers-*.jar