chore: proper keybind handling and better input blocking system (#53) #12
Workflow file for this run
This file contains hidden or 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: Build and Release | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v2 | |
| with: | |
| java-version: '21' | |
| distribution: 'adopt' | |
| - name: Set Mod Version | |
| run: sed -i "s/development_build/${GITHUB_REF##*/}/" gradle.properties | |
| - name: Build with Gradle | |
| run: ./gradlew build | |
| - name: Rename JAR file | |
| run: | | |
| MC_VERSION=$(cat gradle.properties | grep minecraft_version | cut -d '=' -f2) | |
| JAR_NAME=$(ls build/libs/*.jar | grep -v '\-sources\.jar$') | |
| NEW_JAR_NAME="cigarette-${GITHUB_REF##*/}+$MC_VERSION.jar" | |
| mv "$JAR_NAME" "build/libs/$NEW_JAR_NAME" | |
| echo "Renamed JAR to $NEW_JAR_NAME" | |
| echo "NEW_JAR_NAME=$NEW_JAR_NAME" >> $GITHUB_ENV | |
| - name: Create Release and Upload JAR | |
| id: create_release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ github.ref }} | |
| name: Release ${{ github.ref_name }} | |
| draft: false | |
| prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }} | |
| files: build/libs/${{ env.NEW_JAR_NAME }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |