1 #164
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: build | |
on: [push,workflow_dispatch] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest,] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: checkout repository | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: validate gradle wrapper | |
uses: gradle/[email protected] | |
- name: setup jdk 21 | |
uses: actions/[email protected] | |
with: | |
java-version: 21 | |
distribution: 'temurin' | |
- name: make gradle wrapper executable | |
run: chmod +x ./gradlew | |
- uses: burrunan/gradle-cache-action@v1 | |
with: | |
gradle-version: wrapper | |
gradle-distribution-sha-256-sum-warning: false | |
- name: build | |
run: ./gradlew build | |
- name: Move the jar | |
run: ./gradlew move-jar | |
- name: Generate version file | |
run: ./gradlew generate-version-file | |
- name: Read mod version | |
id: mod_version | |
uses: juliangruber/read-file-action@cc341ded5e6547edbdf30bf7b4138a940433641b | |
with: | |
path: ./temp/version/version-info | |
- run: echo ${{ steps.mod_version.outputs.content }} | |
- name: capture build artifacts | |
uses: actions/[email protected] | |
with: | |
name: Stone Craft ${{ steps.mod_version.outputs.content }} beta | |
path: artifacts | |
- name: Set latest tag | |
uses: EndBug/latest-tag@latest | |
- name: Remove assets | |
uses: RawDiamondMC/delete-release-assets@v1 | |
with: | |
tag: latest | |
deleteOnlyFromDrafts: false | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ./artifacts/* | |
prerelease: true | |
tag_name: latest |