File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change 11name : Release to CurseForge and Modrinth
22
33on :
4- release :
5- types : [created, published]
4+ # Only trigger manually to avoid duplicate runs
5+ # GitHub CLI releases don't reliably trigger workflows anyway
66 workflow_dispatch :
77 inputs :
88 release_tag :
99 description : ' Release tag to process (e.g., v1.20.4)'
10- required : false
10+ required : true
1111 type : string
1212
1313jobs :
1717 - name : Checkout code
1818 uses : actions/checkout@v3
1919 with :
20- # If workflow_dispatch, checkout the tag
21- ref : ${{ github.event.inputs.release_tag || github.ref }}
20+ # Checkout the specified tag
21+ ref : ${{ github.event.inputs.release_tag }}
2222
2323 - name : Set up JDK 17
2424 uses : actions/setup-java@v3
3333 - name : Get artifact info
3434 id : artifact
3535 run : |
36- # For workflow_dispatch, use the input tag, otherwise use the ref name
37- if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
38- VERSION="${{ github.event.inputs.release_tag }}"
39- else
40- VERSION="${GITHUB_REF_NAME}"
41- fi
36+ # Use the input tag
37+ VERSION="${{ github.event.inputs.release_tag }}"
4238 VERSION="${VERSION#v}" # Remove 'v' prefix if present
4339 echo "jar_path=$(find target/ -name 'MinecraftServerAPI-*.jar' | head -n 1)" >> $GITHUB_OUTPUT
4440 echo "version=${VERSION}" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments