Fix recipe format changes breaking all machines (#1955) #1114
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: auto-build | |
on: | |
push: | |
branches: | |
- '1.20.1' | |
concurrency: | |
group: auto-build-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
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 | |
run: ./gradlew build --build-cache | |
- name: Publish to Maven | |
run: ./gradlew publish --build-cache | |
- name: Get Version | |
id: var | |
run: | | |
MESSAGE=$(ls build/libs/* | grep dev.jar -v | grep sources.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" | |
echo "version=$MESSAGE-build_${{ github.run_number }}" >> $GITHUB_OUTPUT | |
- name: Release | |
id: release | |
uses: Kir-Antipov/[email protected] | |
with: | |
github-tag: ${{ steps.var.outputs.version }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
files: | | |
build/libs/!(*-@(dev|dev-all|dev-slim|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 }}" |