-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (33 loc) · 1.19 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# https://github.com/FabricMC/fabric/blob/1.20.4/.github/workflows/release.yml
name: Release
on: [workflow_dispatch] # Manual trigger
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-22.04
container:
image: mcr.microsoft.com/openjdk/jdk:21-ubuntu
options: --user root
steps:
- name: Install git
run: apt update && apt install git -y && git --version
- name: Add safe directory
run: git config --global --add safe.directory /__w/$REPOSITORY_NAME/$REPOSITORY_NAME
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: FabricMC/fabric-action-scripts@v2
id: changelog
with:
context: changelog
workflow_id: release.yml
- name: Change wrapper permissions
run: chmod +x ./gradlew
- uses: gradle/wrapper-validation-action@v1
- run: ./gradlew build publishMods --stacktrace -Porg.gradle.parallel.threads=4
env:
REPOSITORY_NAME: ${{ github.event.repository.name }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}
CHANGELOG: ${{ steps.changelog.outputs.changelog }}