Skip to content

Commit

Permalink
Adapt PGM's build workflow
Browse files Browse the repository at this point in the history
Signed-off-by: BT (calcastor/mame) <[email protected]>
  • Loading branch information
calcastor committed Dec 29, 2024
1 parent 00ed35c commit 49dd9fa
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 49 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build
on:
pull_request:
workflow_dispatch:
push:
branches:
- master
jobs:
build:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- id: setup-java
name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
# Configures gradle with caching
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
# Run "gradlew publish" for origin/master and "gradlew build" for PRs or elsewhere
- name: Execute Gradle ${{ (github.repository == 'PGMDev/Events' && github.ref == 'refs/heads/master') && 'Publish' || 'Build' }}
run: ./gradlew ${{ (github.repository == 'PGMDev/Events' && github.ref == 'refs/heads/master') && 'publish' || 'build' }}
env:
GITHUB_TOKEN: ${{ (github.repository == 'PGMDev/Events' && github.ref == 'refs/heads/master') && secrets.GITHUB_TOKEN || '' }}
- id: artifact
name: Upload Jar
uses: actions/upload-artifact@v4
with:
name: Events.jar
path: build/libs/Events.jar
if-no-files-found: error
49 changes: 0 additions & 49 deletions .github/workflows/ci.yml

This file was deleted.

0 comments on commit 49dd9fa

Please sign in to comment.