Merge pull request #8 from PrinterLogic/PI-61314-golc-update-bedrock-… #1
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: Create a Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
permissions: | ||
# Allows checkout and add tag | ||
contents: write | ||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
- name: Create Release | ||
id: create_release | ||
run: | ||
latestTag=$(git describe --tags --abbrev=0) | ||
patchVersion=$(echo $latestTag | perl -pi -e "s/^.*\.//g" 2&> /dev/null) | ||
versionPrefix=$(echo $latestTag | perl -pi -e "s/\d$//g" 2&> /dev/null) | ||
newVersion=$(echo "$versionPrefix$(($patchVersion + 1))") | ||
gh release create $newVersion --generate-notes | ||
env: | ||
GH_TOKEN: ${{ github.token } | ||
Check failure on line 33 in .github/workflows/create-release.yml GitHub Actions / Create a ReleaseInvalid workflow file
|