-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd8ba73
commit 8e94ba1
Showing
3 changed files
with
183 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
previousVersion: | ||
description: 'Previous Version (Do not include v prefix, must be same as the last version tag! Example: 1.4.1)' | ||
required: true | ||
version: | ||
description: 'Version (Do not include v prefix! Example: 1.4.2)' | ||
required: true | ||
jobs: | ||
release: | ||
strategy: | ||
matrix: | ||
java: [17] | ||
os: [ubuntu-22.04] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Create version tag | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
github.rest.git.createRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: "refs/tags/v${{ github.event.inputs.version }}", | ||
sha: context.sha | ||
}) | ||
- name: Fetch tags | ||
run: git fetch --tags | ||
- name: Validate Gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Setup JDK ${{ matrix.java }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: zulu | ||
java-version: ${{ matrix.java }} | ||
- name: Make Grade wrapper executable | ||
if: ${{ runner.os != 'Windows' }} | ||
run: chmod +x ./gradlew | ||
- name: Build | ||
run: ./gradlew generateChangelog build githubRelease modrinth --stacktrace -PlastTag="v${{ github.event.inputs.previousVersion }}" -PcurrentTag="v${{ github.event.inputs.version }}" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_API_KEY }} | ||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | ||
- name: Capture build artifacts | ||
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Artifacts | ||
path: build/libs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,28 @@ | ||
# Done to increase the memory available to gradle. | ||
org.gradle.jvmargs=-Xmx1G | ||
|
||
# Fabric Properties | ||
maven_group=dev.bnjc | ||
archives_base_name=blockgame-journal | ||
|
||
# Fabric/Dependency Metadata | ||
# check these on https://modmuss50.me/fabric.html | ||
minecraft_version=1.20.2 | ||
yarn_mappings=1.20.2+build.4 | ||
loader_version=0.15.7 | ||
|
||
# Mod Properties | ||
mod_version = 0.1.0 | ||
maven_group = dev.bnjc | ||
archives_base_name = blockgame-journal | ||
|
||
# Dependencies | ||
# check this on https://modmuss50.me/fabric.html | ||
fabric_version=0.91.6+1.20.2 | ||
cloth_config_version=12.0.119 | ||
mod_menu_version=8.0.1 | ||
mod_menu_version=8.0.1 | ||
|
||
# Project Metadata | ||
mod_version=0.1.0-alpha | ||
default_release_type=release | ||
github_owner=blackjack26 | ||
github_repo=blockgame-journal | ||
github_url=https://github.com/blackjack26/blockgame-journal | ||
|
||
# Modrinth Metadata | ||
modrinth_slug=blockgame-journal | ||
modrinth_id=L5NYZWmU | ||
|
||
# Changelog Options | ||
changelog_hide_unimportant_commits=true | ||
changelog_max_commit_search=200 |