mirror of
https://codeberg.org/moonleay/Gimbal.git
synced 2025-06-03 06:56:20 +02:00
chore/add-ci (#3)
Added ci for dev and release builds. Reviewed-on: https://codeberg.org/moonleay/Gimbal/pulls/3 Co-authored-by: moonleay <contact@moonleay.net> Co-committed-by: moonleay <contact@moonleay.net>
This commit is contained in:
parent
68e9eeceb6
commit
302f486f1c
4 changed files with 141 additions and 11 deletions
42
.forgejo/workflows/build-dev.yml
Normal file
42
.forgejo/workflows/build-dev.yml
Normal file
|
@ -0,0 +1,42 @@
|
|||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- refs/tags/
|
||||
|
||||
jobs:
|
||||
dev:
|
||||
runs-on: nodebullshit
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
name: Checkout
|
||||
|
||||
- name: Set short git commit reference
|
||||
id: vars
|
||||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: https://github.com/actions/setup-java@v4
|
||||
name: Setup Java
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- uses: https://github.com/gradle/actions/setup-gradle@v3
|
||||
name: Setup Gradle
|
||||
env:
|
||||
GIT_SHA_SHORT: ${{ steps.vars.outputs.sha_short }}
|
||||
|
||||
- run: ./gradlew runDatagen
|
||||
name: Generate assets
|
||||
env:
|
||||
GIT_SHA_SHORT: ${{ steps.vars.outputs.sha_short }}
|
||||
|
||||
- run: ./gradlew build
|
||||
name: Build project
|
||||
env:
|
||||
GIT_SHA_SHORT: ${{ steps.vars.outputs.sha_short }}
|
||||
|
||||
- run: ./gradlew publish
|
||||
name: Upload
|
||||
env:
|
||||
GIT_SHA_SHORT: ${{ steps.vars.outputs.sha_short }}
|
||||
PACKAGE_REPO_KEY: ${{ secrets.PACKAGE_REPO_KEY }}
|
54
.forgejo/workflows/build-release.yml
Normal file
54
.forgejo/workflows/build-release.yml
Normal file
|
@ -0,0 +1,54 @@
|
|||
on:
|
||||
release:
|
||||
types:
|
||||
- released
|
||||
- prereleased
|
||||
- created
|
||||
- published
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: nodebullshit
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
name: Checkout
|
||||
|
||||
- name: Fetch the full git repository
|
||||
run: git fetch --prune --unshallow
|
||||
|
||||
- name: Set short git commit reference
|
||||
id: vars
|
||||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: https://github.com/actions/setup-java@v4
|
||||
name: Setup Java
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- uses: https://github.com/gradle/actions/setup-gradle@v3
|
||||
name: Setup Gradle
|
||||
env:
|
||||
GIT_SHA_SHORT: ${{ steps.vars.outputs.sha_short }}
|
||||
|
||||
- run: ./gradlew runDatagen
|
||||
name: Generate assets
|
||||
env:
|
||||
GIT_SHA_SHORT: ${{ steps.vars.outputs.sha_short }}
|
||||
|
||||
- run: ./gradlew build
|
||||
name: Build project
|
||||
env:
|
||||
GIT_SHA_SHORT: ${{ steps.vars.outputs.sha_short }}
|
||||
|
||||
- run: ./gradlew publish
|
||||
name: Upload
|
||||
env:
|
||||
GIT_SHA_SHORT: ${{ steps.vars.outputs.sha_short }}
|
||||
PACKAGE_REPO_KEY: ${{ secrets.PACKAGE_REPO_KEY }}
|
||||
|
||||
- run: ./gradlew modrinth
|
||||
name: Publish to Modrinth
|
||||
env:
|
||||
GIT_SHA_SHORT: ${{ steps.vars.outputs.sha_short }}
|
||||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
Loading…
Add table
Add a link
Reference in a new issue