Skip to content

--release

--release #44

name: Generate github tag version ☕
on:
push:
branches: [master]
jobs:
build:
if: "contains(github.event.head_commit.message, '--release')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Installing Composer dependencies ⬇️
run: composer install --prefer-dist --no-progress
- name: Installing Node dependencies ⬇️
run: yarn install --frozen-lockfile --prefer-offline
- name: Building node dependencies 🧱
run: yarn build
- name: Removing development folders 🗑️
run: |
rm -r -f build/
rm -r -f node_modules/
rm -r -f .vscode/
rm -r -f .parcel-cache/
rm -r -f .idea/
rm -r -f tests/
rm -r -f assets/scripts/
rm -r -f assets/styles/
- name: Removing development files 🗑️
run: |
rm -f composer.json
rm -f composer.lock
rm -f package.json
rm -f package-json.lock
rm -f yarn.lock
rm -f README.md
rm -f .gitignore
rm -f tailwind.config.js
- name: Creating a new GitHub tag 🤖
run: |
TAG_VERSION=$(bash .github/tag.sh)
rm -r -f .github/
git config --global user.email "[email protected]"
git config --global user.name "Matheus Aguiar"
git add .
git commit -am "build: Building a new version"
git tag -a v$TAG_VERSION -m "New tag: v$TAG_VERSION"
git push origin v$TAG_VERSION
echo "All right! 🍕"