Skip to content

(untested) add last_update column and use it as a secondary sort inst… #329

(untested) add last_update column and use it as a secondary sort inst…

(untested) add last_update column and use it as a secondary sort inst… #329

Workflow file for this run

name: Deploy Pre-Release to Polymart/Modrinth
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
environment: polymart_deploy
if: |
!github.event.pull_request.head.repo.fork &&
!contains(github.event.head_commit.message, '[skipci]')
env:
GH: ${{ toJson(github) }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
- name: Change version to include build
run: |
export OLD_VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'`
export NEW_VERSION=$OLD_VERSION-b${{github.run_number}}
(cat build.gradle.kts | sed "s/$OLD_VERSION/$NEW_VERSION/") > temp.txt
mv temp.txt build.gradle.kts
echo Version number is now $(cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}') - $NEW_VERSION
cat build.gradle.kts
- name: Build with Gradle
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
with:
arguments: :shadowJar
- name: Upload build files artifact
uses: actions/upload-artifact@v4.4.0
with:
# Artifact name
name: build-files
# A file, directory or wildcard pattern that describes what to upload
path: 'build/*'
# The desired behavior if no files are found using the provided path.
if-no-files-found: error
retention-days: 2
- name: Deploy to Polymart/Modrinth
env:
POLYMART_TOKEN: ${{ secrets.POLYMART_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
GH: ${{ toJson(github) }}
run: npx tsx .github/workflows/scripts/upload.ts --project .github/workflows/scripts/tsconfig.json