Skip to content

Commit

Permalink
fix create release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BrendonButler committed Aug 18, 2023
1 parent 0e1f2cd commit 8fb9dc2
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ on:
tags:
- '*'
workflow_dispatch:
inputs:
releaseType:
description: 'Release Type'
required: true
default: release
type: choice
options:
- alpha
- beta
- release

jobs:
publish-release:
Expand Down Expand Up @@ -73,15 +63,31 @@ jobs:
artifacts: ~/shops-${{ needs.publish-release.outputs.previous-tag }}/shops-${{ needs.publish-release.outputs.previous-tag }}.jar
tag: ${{ needs.publish-release.outputs.previous-tag }}

- name: Determine Release Stage
run: |
tag=${{ needs.publish-release.outputs.previous-tag }}
lowercase_tag=$(echo "$tag" | tr '[:upper:]' '[:lower:]')
if [[ $lowercase_tag == *"beta"* ]]; then
release_stage="beta"
elif [[ $lowercase_tag == *"alpha"* ]]; then
release_stage="alpha"
else
release_stage="release"
fi

echo "Release stage: $release_stage"
echo "::set-output name=release_stage::$release_stage"

- name: Upload to CurseForge
uses: itsmeow/curseforge-upload@v3
with:
file_path: ~/shops-${{ needs.publish-release.outputs.previous-tag }}/shops-${{ needs.publish-release.outputs.previous-tag }}.jar
game_endpoint: bukkit
relations: vault:requiredDependency,essentialsx:optionalDependency
game_versions: 'Minecraft 1.18:1.18.2,Minecraft 1.19:1.19.4,Minecraft 1.20:1.20.1,Java 17'
release_type: ${{ inputs.releaseType }}
display_name: Shops ${{ needs.publish-release.outputs.previous-tag }'
release_type: ${{ steps.create-release.outputs.release_stage }}
display_name: Shops ${{ needs.publish-release.outputs.previous-tag }}
#changelog: TODO: ADD GENERATED CHANGELOG
#changelog_type: markdown
project_id: 873479
Expand Down

0 comments on commit 8fb9dc2

Please sign in to comment.