-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add changelog, update to latest version of build and release file
- Loading branch information
Showing
3 changed files
with
152 additions
and
26 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 |
---|---|---|
@@ -1,35 +1,37 @@ | ||
# 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. | ||
name: Build on Push/PR | ||
|
||
name: build | ||
on: [pull_request, push] | ||
on: | ||
pull_request: | ||
push: | ||
workflow_dispatch: | ||
|
||
env: | ||
JAVA_VERSION: 17 | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
java: [17] # We only support JDK 17 in master branch | ||
os: [ubuntu-20.04] | ||
runs-on: ${{ matrix.os }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v2 | ||
- name: validate gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: setup jdk ${{ matrix.java }} | ||
uses: actions/setup-java@v2 | ||
- name: Check out source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Validate Gradle wrapper | ||
uses: gradle/actions/wrapper-validation@v3 | ||
|
||
- name: Setup JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: adopt | ||
java-version: ${{ matrix.java }} | ||
- name: make gradle wrapper executable | ||
if: ${{ runner.os != 'Windows' }} | ||
run: chmod +x ./gradlew | ||
- name: build | ||
run: ./gradlew build | ||
- name: upload build artifacts | ||
uses: actions/upload-artifact@v2 | ||
distribution: "temurin" | ||
java-version: "${{env.JAVA_VERSION}}" | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
|
||
- name: Build with Gradle | ||
run: gradle build | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: Release on tag | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
env: | ||
JAVA_VERSION: 17 | ||
MODRINTH_ID: 'mfDfQvcJ' | ||
CURSEFORGE_ID: '544608' | ||
|
||
jobs: | ||
build-and-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Validate Gradle wrapper | ||
uses: gradle/actions/wrapper-validation@v3 | ||
|
||
- name: Setup JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '${{env.JAVA_VERSION}}' | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
|
||
- name: Build with Gradle | ||
run: gradle build | ||
|
||
- name: Get version numbers from tag | ||
id: version | ||
run: | | ||
# Extract mod and minecraft version from tag | ||
mod_version=${GITHUB_REF_NAME#v} | ||
mod_version="${mod_version%+*}" | ||
minecraft_version=${GITHUB_REF_NAME#*+} | ||
echo "mod=$mod_version" >> $GITHUB_OUTPUT | ||
echo "minecraft=$minecraft_version" >> $GITHUB_OUTPUT | ||
echo "full=$mod_version+$minecraft_version" >> $GITHUB_OUTPUT | ||
echo Mod version: $mod_version | ||
echo Minecraft version: $minecraft_version | ||
- name: Install parse-changelog | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: parse-changelog | ||
|
||
- name: Parse changelog | ||
id: changelog | ||
continue-on-error: true | ||
run: | | ||
# Extract the changelog entry for this release | ||
mkdir -p output | ||
changelog=output/changelog.md | ||
parse-changelog CHANGELOG.md ${{ steps.version.outputs.full }} > $changelog || true | ||
if [[ ! -s $changelog ]]; then | ||
# No changelog for specific version (mod+minecraft), try just mod version | ||
parse-changelog CHANGELOG.md ${{ steps.version.outputs.mod }} > $changelog || true | ||
fi | ||
if [[ ! -s $changelog ]]; then | ||
echo "No changelog available" > $changelog | ||
fi | ||
echo Extracted changelog for this release: | ||
cat $changelog | ||
echo "file=$changelog" >> $GITHUB_OUTPUT | ||
- name: Publish release | ||
id: publish | ||
uses: Kir-Antipov/[email protected] | ||
with: | ||
modrinth-id: ${{ env.MODRINTH_ID }} | ||
curseforge-id: ${{ env.CURSEFORGE_ID }} | ||
github-token: ${{ secrets.MY_GITHUB_TOKEN }} | ||
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | ||
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | ||
name: Mod Settings ${{ steps.version.outputs.mod }} (${{ steps.version.outputs.minecraft }}) | ||
version: ${{ steps.version.outputs.full }} | ||
version-type: release | ||
changelog-file: ${{ steps.changelog.outputs.file }} | ||
dependencies: | | ||
fabric-api(required){modrinth:P7dR8mSH}{curseforge:306612}#(ignore:github) | ||
- name: Show results | ||
run: | | ||
# Show results from mc-publish | ||
echo Successfully published Mod Settings ${{ steps.version.outputs.full }} | ||
echo Modrinth release ${{ steps.publish.outputs.modrinth-version }}: ${{ steps.publish.outputs.modrinth-url }} | ||
echo CurseForge release ${{ steps.publish.outputs.curseforge-version }}: ${{ steps.publish.outputs.curseforge-url }} | ||
echo GitHub release ${{ steps.publish.outputs.github-tag }}: ${{ steps.publish.outputs.github-url }} |
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,29 @@ | ||
# Changelog | ||
|
||
## 1.1.0+1.17.1 - 2022-04-17 | ||
|
||
### Added | ||
|
||
- 1.1.0 on Minecraft 1.17.1 | ||
|
||
## 1.1.0 - 2022-04-17 | ||
|
||
### Added | ||
|
||
- Add a hotkey to bring up the Mod Settings screen | ||
|
||
### Fixed | ||
|
||
- Fixes multiple incompatibilities with other mods | ||
|
||
## 1.0.0+1.18.1 - 2022-01-20 | ||
|
||
### Added | ||
|
||
- Support for Minecraft 1.18.1 | ||
|
||
## 1.0.0 - 2021-11-06 | ||
|
||
### Added | ||
|
||
- First release |