Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMPROVEMENT] Build Artifacts #49

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 31 additions & 26 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,53 @@
name: build
# Build Workflow

name: Build

on:
push:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change this lol ?

branches: '*'
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.gitignore'
pull_request:
branches: '*'
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.gitignore'
workflow_dispatch:
push:

concurrency:
# Maximum of one running workflow per pull request source branch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove these comments?

# or branch and run number combination (cancels old run if action is rerun)
group: ${{ github.head_ref || format('{0}-{1}', github.ref, github.run_number) }}
cancel-in-progress: true

jobs:
build:
name: "Build"
runs-on: "ubuntu-latest"
name: Build

steps:
- uses: actions/checkout@v2
runs-on: ubuntu-latest

- uses: gradle/wrapper-validation-action@v1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gradle wrapper validation is important

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-java@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should bump all actions deps

with:
distribution: "temurin"
java-version: "17"
java-version: 17
distribution: temurin
cache: 'gradle'

- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-v2-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
**/loom-cache
**/prebundled-jars
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-v2-
- run: chmod +x ./gradlew
- run: ./gradlew --no-daemon build
${{ runner.os }}-gradle-
- name: Chmod Gradle
run: chmod +x ./gradlew

- name: Build
run: ./gradlew build --no-daemon

- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
with:
name: artifacts
path: build/libs