Skip to content

Fix build version and release (#433) #9

Fix build version and release (#433)

Fix build version and release (#433) #9

Workflow file for this run

name: Release
on:
push:
tags:
- "*"
jobs:
build-bundle:
name: Build & Test
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '19'
distribution: 'temurin'
architecture: x64
cache: 'gradle'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Grant permissions to gradlew
run: chmod +x gradlew
- name: Get build version
run: echo "build_version=$(./gradlew -q printVersion)" >> $GITHUB_ENV
- name: Check tag matches project version
if: ${{ env.build_version != github.ref_name }}
run: exit 1
- name: Run distribution assembly
run: ./gradlew assembleBundleDist
- name: Upload distribution
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run:
gh release create ${{ github.ref_name }} ./game/build/distributions/void-${{ github.ref_name }}.zip