Merge pull request #126 from Lyzev/125-bug-changing-window-size-crash… #81
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
name: "Release Nightly Build" | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- '*.properties' | |
- '*.kts' | |
- 'gradle/**' | |
- "src/**" | |
branches: | |
- 'master' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
CI: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
cache: gradle | |
- name: Read version from gradle.properties | |
id: get_version | |
run: echo "mod_version=$(grep -oP 'mod_version=\K.+' gradle.properties)" >> $GITHUB_OUTPUT | |
- name: Read mod_name from gradle.properties | |
id: get_mod_name | |
run: echo "mod_name=$(grep -oP 'mod_name=\K.+' gradle.properties)" >> $GITHUB_OUTPUT | |
- name: Set Commit Hash | |
id: commit_hash | |
run: echo "commit_hash=$(git log --pretty=format:'%h' -n 1)" >> $GITHUB_OUTPUT | |
- name: Set Current Date and Time | |
id: current_datetime | |
run: echo "current_datetime=$(date +'%Y.%m.%d %H:%M')" >> $GITHUB_OUTPUT | |
- name: Build the project | |
run: ./gradlew build | |
- name: Create Release Assets | |
run: | | |
echo "Running shell script with version: ${{ github.event.inputs.version }}" | |
mkdir release | |
cp build/libs/*.jar release | |
for asset in release/*; do | |
md5sum $asset >> $asset.md5 | |
sha1sum $asset >> $asset.sha1 | |
sha256sum $asset >> $asset.sha256 | |
sha512sum $asset >> $asset.sha512 | |
done | |
ls -l release | |
- uses: marvinpinto/action-automatic-releases@latest | |
name: Create Release | |
with: | |
repo_token: '${{ secrets.GITHUB_TOKEN }}' | |
automatic_release_tag: 'v${{ steps.get_version.outputs.mod_version }}+${{ steps.commit_hash.outputs.commit_hash }}' | |
title: '${{ steps.get_mod_name.outputs.mod_name }} ${{ steps.get_version.outputs.mod_version }}+${{ steps.commit_hash.outputs.commit_hash }}' | |
files: | | |
release/* |