Release #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
bump-type: | |
type: choice | |
required: true | |
options: | |
- patch | |
- minor | |
- major | |
permissions: | |
contents: write | |
discussions: write | |
jobs: | |
bump: | |
runs-on: macos-latest | |
steps: | |
# Checkout with custom token for pushin to protected branch | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | |
# Update version in all files and commit | |
- name: Bump and Git Commit | |
run: | | |
git config user.name "swiftyfinch" | |
git config user.email "[email protected]" | |
BUMP_TYPE=${{ github.event.inputs.bump-type }} | |
NEW_VERSION=`ruby .github/scripts/bump.rb $BUMP_TYPE` | |
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV | |
echo "[$BUMP_TYPE] → $NEW_VERSION" | |
- name: Build Release | |
run: make release | |
- name: Git Push | |
run: git push origin | |
- name: Release Draft | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: 🏈 Rugby ${{ env.NEW_VERSION }} | |
draft: true | |
generate_release_notes: true | |
discussion_category_name: Releases | |
fail_on_unmatched_files: true | |
files: Release/*.zip | |
tag_name: ${{ env.NEW_VERSION }} |