9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-19 15:09:19 +00:00

Repo workflow

This commit is contained in:
LoJoSho
2023-02-02 15:23:05 -06:00
parent a1ac0a83e1
commit fdc0004b75
2 changed files with 83 additions and 0 deletions

29
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Publish to HibiscusMC Repository
on:
push:
branches:
- master
jobs:
build:
if: "!contains(github.event.head_commit.message, 'dependabot') && !contains(github.event.head_commit.message, 'nopush')"
environment: build
runs-on: ubuntu-latest
env:
HAS_TOKEN: ${{ secrets.REPO_PASSWORD != '' }}
steps:
- uses: actions/checkout@v2.3.4
- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
- name: Build with Gradle
run: ./gradlew api:clean api:build --no-daemon --stacktrace
- name: Publish to Nexus
if: ${{ env.HAS_TOKEN == 'true' }}
run: ./gradlew api:publishMavenPublicationToSkyRepositoryRepository
env:
REPO_USERNAME: ${{ secrets.REPO_USERNAME }}
REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }}