Skip to content

Commit

Permalink
- GitHub Actionsを更新?
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiiragi283 committed Jan 24, 2025
1 parent ae640e8 commit 129dbb0
Showing 1 changed file with 29 additions and 17 deletions.
46 changes: 29 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
name: Build
# Automatically build the project and run any configured tests for every push
# and submitted pull request. This can help catch issues that only occur on
# certain platforms or Java versions, and provides a first line of defence
# against bad commits.

on: [push, pull_request]
name: build
on: [pull_request, push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# Use these Java versions
java: [
21, # Current Java LTS
]
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Setup JDK 21
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Build with Gradle
run: ./gradlew build
java-version: ${{ matrix.java }}
distribution: 'microsoft'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: capture build artifacts
if: ${{ matrix.java == '21' }} # Only upload artifacts built from latest java
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/

0 comments on commit 129dbb0

Please sign in to comment.