Skip to content

Commit

Permalink
ci: auto-tag and create gh releases
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTJP committed Jul 31, 2021
1 parent 20f08f1 commit cdd5b37
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,34 @@ jobs:
"release")
publish_maven=true
publish_curse=true
publish_gh_release=true
version_format="\${major}.\${minor}.\${patch}"
;;
"beta")
publish_maven=true
publish_curse=true
publish_gh_release=false
version_format="\${major}.\${minor}.\${patch}-beta-\${increment}"
;;
"alpha")
publish_maven=true
publish_curse=false
publish_gh_release=false
version_format="\${major}.\${minor}.\${patch}-alpha-\${increment}"
;;
*)
echo "::warning::Unknown release type: $release_type"
publish_maven=false
publish_curse=false
publish_gh_release=false
version_format="\${major}.\${minor}.\${patch}-$release_type-\${increment}"
esac
echo "::set-output name=release_channel::$release_channel"
echo "::set-output name=release_type::$release_type"
echo "::set-output name=publish_maven::$publish_maven"
echo "::set-output name=publish_curse::$publish_curse"
echo "::set-output name=publish_gh_release::$publish_gh_release"
echo "::set-output name=version_format::$version_format"
- name: Generate version
Expand Down Expand Up @@ -122,6 +127,17 @@ jobs:
CURSE_RELEASE_TYPE: ${{ steps.release_type.outputs.release_type }}
CURSE_TOKEN: ${{ secrets.CURSE_TOKEN }}

- name: Tag and Release
if: ${{ steps.release_type.outputs.publish_gh_release == 'true' }}
uses: softprops/action-gh-release@v0.1.7
with:
body_path: CHANGELOG.md
tag_name: ${{ steps.versioning.outputs.version_tag }}
files: |
build/libs/*
CHANGELOG.md
CHANGELOG.txt
- name: Update badge
uses: schneegans/dynamic-badges-action@v1.0.0
with:
Expand Down

0 comments on commit cdd5b37

Please sign in to comment.