Release for v1.21.60 #27
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 MCPACK and release | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- ".github/**" | |
- ".gitignore" | |
jobs: | |
create-release: | |
if: startsWith(github.event.head_commit.message, 'Release for') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Extract version from commit message | |
id: extract-version | |
run: | | |
version=$(echo "${{ github.event.head_commit.message }}" | sed -n 's/^Release for \(v[0-9]*\.[0-9]*\.[0-9]*\).*$/\1/p') | |
echo "version=$version" >> $GITHUB_ENV | |
- name: Create tag | |
run: | | |
git tag ${{ env.version }} | |
git push origin ${{ env.version }} | |
- name: Make ZIP for MCPACK | |
run: | | |
zip -r oreui-utilities.zip.mcpack * -x "*.git*" ".github/*" ".gitignore" "last_sha256.txt" | |
- name: Upload to release | |
env: | |
GH_TOKEN: ${{ GITHUB.TOKEN }} | |
run: | | |
gh release create ${{ env.version }} oreui-utilities.zip.mcpack --title "For ${{ env.version }} ONLY" --notes "Pack icon and code by @Stivusik ($(TZ='Asia/Dhaka' date +'%Y%m%d'))" --latest |