Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Update build.gradle #18

Update build.gradle

Update build.gradle #18

Workflow file for this run

name: build
on:
push:
workflow_dispatch:
inputs:
version_type:
description: "The type of this version. e.g alpha"
type: choice
default: beta
options:
- release
- beta
- alpha
required: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/[email protected]
- name: validate gradle wrapper
uses: gradle/[email protected]
- name: setup jdk 17
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: 17
cache: gradle
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build and publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew build publish
- name: get version #https://stackoverflow.com/questions/71089787/how-to-get-version-name-from-android-gradle-file-in-github-actions
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "VERSION_INFORMATION=$(${{github.workspace}}/gradlew -q printVersionName)" >> $GITHUB_ENV
echo "VERSION_PLAIN=$(${{github.workspace}}/gradlew -q printVersion)" >> $GITHUB_ENV
- name: publish release
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: Kir-Antipov/[email protected]
with:
version-type: ${{ inputs.version_type }}
changelog: CHANGELOG.md
name: ${{ env.VERSION_INFORMATION }}
version: ${{ env.VERSION_PLAIN }}
game-versions: |
1.20.1
loaders: |
fabric
java: |
17
#modrinth-id: qcz8IJ9L
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-featured: true
modrinth-unfeature-mode: subset
modrinth-dependencies: |
fabric-api(required)
dark-matter(embedded)