Skip to content

Update gradle wrapper #47

Update gradle wrapper

Update gradle wrapper #47

Workflow file for this run

# This is the build workflow for GitHub Actions.
name: Build
on:
pull_request:
push:
branches:
- "**"
workflow_call:
inputs:
ref:
required: false
type: string
permissions:
id-token: write
contents: read
attestations: write
actions: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout latest commit
if: ${{ inputs.ref == '' }}
uses: actions/[email protected]
- name: Checkout requested ref
if: ${{ inputs.ref != '' }}
uses: actions/[email protected]
with:
ref: ${{ inputs.ref }}
- uses: gradle/actions/[email protected]
- name: Setup JDK 21
uses: actions/[email protected]
with:
java-version: 21
distribution: temurin
- name: Mark gradlew as an executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Build
run: ./gradlew build
- name: Determine artifact name
id: name
run: |
BASE_NAME=$(awk -F '=' '/archives_base_name/ { print $2; }' gradle.properties)
VERSION=$(awk -F '=' '/mod_version/ { print $2; }' gradle.properties)
echo "name=$BASE_NAME-$VERSION.jar" >> $GITHUB_OUTPUT
- name: Generate artifact attestation
uses: actions/[email protected]
with:
subject-path: build/libs/${{ steps.name.outputs.name }}
- name: Upload artifact
uses: actions/[email protected]
with:
name: Artifacts
path: build/libs/${{ steps.name.outputs.name }}