Skip to content

Commit

Permalink
GitHub Publish Release Action
Browse files Browse the repository at this point in the history
  • Loading branch information
mdujovic17 committed Sep 4, 2024
1 parent 15dce9f commit ff54a40
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish on GitHub Releases, CurseForge and Modrinth
on: [pull_request, workflow_dispatch]

env:
MINECRAFT_VERSION: 1.21.1
JAVA_VERSION: 21
VERSION: 5.0.0+1.21.1
RELEASE_NAME: Additional Bars 5.0.0
GITHUB_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }}

permissions:
contents: write

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

- name: Check-out Repo
uses: actions/checkout@v3
with:
submodules: true

- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: ${{env.JAVA_VERSION}}

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

- name: Build
run: ./gradlew clean build

- name: Publish to GitHub
uses: Kir-Antipov/mc-publish@v3.3
with:
github-tag: "v${{env.VERSION}}"
github-token: "${{env.GITHUB_TOKEN}}"

name: "${{env.RELEASE_NAME}}"
version: "${{env.VERSION}}"
version-type: release
changelog-file: CHANGELOG.md

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

0 comments on commit ff54a40

Please sign in to comment.