Nightly build #236
Workflow file for this run
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: Nightly build | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
gradle: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Update ingame version | |
uses: jacobtomlinson/gha-find-replace@v3 | |
with: | |
find: "new Version(\"${{ vars.VERSION }}-dev${{ vars.VERSION_old }}\");" | |
replace: "new Version(\"${{ vars.VERSION }}-dev${{ vars.VERSION_s }}\");" | |
include: "src/client/java/minicraft/core/Game.java" | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 8 | |
- name: Update gradle version | |
uses: jacobtomlinson/gha-find-replace@v3 | |
with: | |
find: "version = \"${{ vars.VERSION }}-dev${{ vars.VERSION_old }}\"" | |
replace: "version = \"${{ vars.VERSION }}-dev${{ vars.VERSION_s }}\"" | |
include: "build.gradle" | |
- name: Increment old version number | |
uses: action-pack/increment@v2 | |
with: | |
name: 'VERSION_old' | |
token: ${{ secrets.LITOROMTOKEN }} | |
repository: ${{ secrets.GITHUB_REPOSITORY }} | |
owner: 'MinicraftPlus' | |
- name: Increment new version number | |
uses: action-pack/increment@v2 | |
with: | |
name: 'VERSION_s' | |
token: ${{ secrets.LITOROMTOKEN }} | |
repository: ${{ secrets.GITHUB_REPOSITORY }} | |
owner: 'MinicraftPlus' | |
- name: Setup Gradle | |
uses: gradle/[email protected] | |
- name: Execute Gradle build | |
run: ./gradlew build | |
- name: Push changes | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.LITOROMTOKEN }} | |
branch: ${{ github.ref }} | |
- uses: "dciborow/[email protected]" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "v${{ vars.VERSION }}-dev${{ vars.VERSION_s }}" | |
prerelease: true | |
title: "Version ${{ vars.VERSION }}, Pre-release ${{ vars.VERSION_s }} (Nightly)" | |
generate_release_notes: true | |
files: | | |
LICENSE | |
ChangeLog.md | |
build/libs/**.jar | |