Skip to content

attempt at fixing github releases' names? (#1793) #1008

attempt at fixing github releases' names? (#1793)

attempt at fixing github releases' names? (#1793) #1008

Workflow file for this run

name: auto-build
on:
push:
branches:
- '1.20.1'
jobs:
build:
runs-on: ubuntu-latest
env:
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
MAVEN_USER: ${{ secrets.MAVEN_USER }}
SNAPSHOT: true
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Build
uses: ./.github/actions/build_setup
- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: build
- name: Publish to Maven
uses: gradle/gradle-build-action@v2
with:
arguments: publish
- name: Get Version
id: var
run: |
MESSAGE=$(ls build/libs/* | grep sources.jar -v | grep shadow.jar -v | grep slim.jar -v | awk -F 'gtceu-|-SNAPSHOT.jar' '{print $2}')
mv "build/libs/gtceu-$MESSAGE-SNAPSHOT.jar" "build/libs/gtceu-$MESSAGE-build_${{ github.run_number }}-SNAPSHOT.jar"
mv "build/libs/gtceu-$MESSAGE-SNAPSHOT-slim.jar" "build/libs/gtceu-$MESSAGE-build_${{ github.run_number }}-SNAPSHOT-slim.jar"
mv "build/libs/gtceu-$MESSAGE-SNAPSHOT-dev-shadow.jar" "build/libs/gtceu-$MESSAGE-build_${{ github.run_number }}-SNAPSHOT-dev-shadow.jar"
echo "version=$MESSAGE-build_${{ github.run_number }}" >> $GITHUB_OUTPUT
- name: Release
id: release
uses: Kir-Antipov/[email protected]
with:
name: ${{ steps.var.outputs.version }}
github-tag: ${{ steps.var.outputs.version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
files: |
build/libs/!(*-@(dev|sources|javadoc)).jar
- name: Print Output
run: |
echo "Release tag: ${{ steps.release.outputs.github-tag }}"
echo "Release URL: ${{ steps.release.outputs.github-url }}"
echo "Released files: ${{ steps.release.outputs.github-files }}"