Knockdowns-Legacy/.github/workflows/deploy.yml
Rongmario c82fcee8aa
Merge overhaul branch to be upstream (#24)
* Debug mode for publishing artifacts
* Jabel
* Generation of mod meta, pack meta and mixin jsons
* Fixed runObfServer using 1.7's main class rather than 1.12's
- Allows changing of source without it being regenerated in dev
* ExampleMod + fixing tag collection
* Template expanding for mcmod.info + pack.mcmeta + remove redundant tasks
- Now supports arbitrary script blocks to retrieve value `${{ }}` from directly in gradle.properties
* Deployment via tasks/actions + changelog support + script folder
* Fixed mixin json generating condition
* Fix ATs not being applied
* Allow mixinbooter & configanytime to be prioritized in obf runs
* Remove redundant coremod arg addition as manifest is read at runtime
* Allow processResources to work correctly
* refactor: make parser changelog as method instead of job
* fix: ensure correct header parser for changelog (2to2 and 3to3)
* fix: no env available due to Github don't automatic inject env value to GHA
* refactor: standardize mod version with SemVer, remove unnecessary changelog block in `build.gradle`
* refactor: mixin config template and generator, resource filter
* Updated Gradle to 8.7 + RetroFuturaGradle to 1.3.35
* Update MixinBooter to 9.1 + provide wiki link

Co-authored-by: Oganesson897 <101081378+Darknight123MC@users.noreply.github.com>
Co-authored-by: Li <nhatlinh.l195@gmail.com>
Co-authored-by: Li <li.hvktqs@gmail.com>
2024-04-07 18:39:25 +01:00

61 lines
1.8 KiB
YAML

# A deployment template that works out of the box
# It supports these objectives:
# - Deploy to Maven (Build Job) [Secrets: MAVEN_USER, MAVEN_PASS]
# - Deploy to CurseForge (Upload Job) [Secrets: CURSEFORGE_TOKEN]
# - Deploy to Modrinth (Upload Job) [Secrets: MODRINTH_TOKEN]
name: Deploy
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Grant Execute Permission for gradlew
run: chmod +x gradlew
- name: Read gradle.properties
uses: BrycensRanch/read-properties-action@v1
id: properties
with:
file: gradle.properties
all: true
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Publish to Maven
if: steps.properties.outputs.publish_to_maven == 'true' && steps.properties.outputs.publish_to_local_maven == 'true'
uses: gradle/gradle-build-action@v2
with:
arguments: |
publish
-P${{ steps.properties.outputs.maven_name }}Username=${{ secrets.MAVEN_USER }}
-P${{ steps.properties.outputs.maven_name }}Password=${{ secrets.MAVEN_PASS }}
- name: Publish to CurseForge
if: steps.properties.outputs.publish_to_curseforge == 'true'
uses: gradle/gradle-build-action@v2
env:
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
with:
arguments: curseforge
- name: Publish to Modrinth
if: steps.properties.outputs.publish_to_modrinth == 'true'
uses: gradle/gradle-build-action@v2
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
with:
arguments: modrinth