Skip to content

Commit bf4a75c

Browse files
authored
Merge pull request #445 from BentoBoxWorld/ci/curseforge-publish
Add CurseForge publish workflow (publishes the release asset)
2 parents 4cbe568 + a08946b commit bf4a75c

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
11
# Level — .github/workflows/publish.yml
2-
# CurseForge-first rollout. Hangar left blank; add its slug later to enable Hangar.
2+
# Publishes the jar attached to a GitHub release to CurseForge and Hangar via the
3+
# shared BentoBoxWorld/.github reusable workflow. Downloads the release asset instead of
4+
# rebuilding from source. The reusable workflow is pinned to a commit SHA (Sonar
5+
# githubactions:S7637). workflow_dispatch lets you (re)publish a given version.
36

4-
name: Publish release
7+
name: Publish release to CurseForge and Hangar
58

69
on:
710
release:
811
types: [published]
12+
workflow_dispatch:
13+
inputs:
14+
version:
15+
description: "Version to publish (e.g. 1.2.3)"
16+
required: true
17+
type: string
918

1019
jobs:
1120
publish:
12-
uses: bentoboxworld/.github/.github/workflows/publish-platforms.yml@main
21+
uses: bentoboxworld/.github/.github/workflows/publish-platforms.yml@71bf927bce32586216baa6995f21852d944b98b9 # master
1322
with:
14-
hangar_slug: ""
23+
use_release_asset: "true" # publish the jar attached to the release; do not rebuild
24+
hangar_slug: "Level" # blank = skip Hangar
1525
curseforge_id: "1514824"
16-
game_versions: "26.1.2,26.1.1,26.1,1.21.11,1.21.10,1.21.9,1.21.8,1.21.7,1.21.6"
26+
game_versions: "26.2,26.1.2,26.1.1,26.1,1.21.11,1.21.10,1.21.9,1.21.8,1.21.7,1.21.6,1.21.5"
27+
version: ${{ inputs.version }} # empty on release events -> falls back to the release tag
1728
secrets:
1829
HANGAR_API_KEY: ${{ secrets.HANGAR_API_KEY }}
1930
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}

0 commit comments

Comments
 (0)