Skip to content

[GitHub] Update action to grab the tag name #3

[GitHub] Update action to grab the tag name

[GitHub] Update action to grab the tag name #3

Workflow file for this run

name: Build Cult & Release
on:
push:
tags:
- '*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '22'
- name: Compile
run: javac --enable-preview --source 22 -d target src/Main.java && java --enable-preview -cp target Main build
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- uses: softprops/action-gh-release@v2
with:
draft: true
files: |
./target/jar/cult-${{ steps.get_version.outputs.VERSION }}.jar