Skip to content

Commit

Permalink
Add publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Poopooracoocoo committed Feb 6, 2024
1 parent 9f483ad commit c5d58a1
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Publish on GitHub, CurseForge & Modrinth

on: [ push, pull_request, workflow_dispatch ]

env:
MINECRAFT_VERSION: 1.20.1
JAVA_VERSION: 17
VERSION: 1.0.0+1.20.1
RELEASE_NAME: Eden Ring fork 1.0.0 for Minecraft 1.20.1
GITHUB_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }}

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Environment Variables
run: env

- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true

- name: Setup JDK 17
uses: actions/setup-java@v2
with:
distribution: "microsoft"
java-version: 17
cache: gradle

- name: Make Gradle Wrapper Executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Cache Gradle dependencies
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build
run: ./gradlew build

- name: Publish GitHub
uses: Kir-Antipov/[email protected]
with:
github-tag: "v${{env.VERSION}}"
github-token: "${{ secrets.MY_GITHUB_TOKEN }}"

name: "${{env.RELEASE_NAME}}"
version: "${{env.VERSION}}"
version-type: release

loaders: fabric
game-versions: "${{env.MINECRAFT_VERSION}}"
java: "${{env.JAVA_VERSION}}"

0 comments on commit c5d58a1

Please sign in to comment.