Skip to content

Fix deleting files

Fix deleting files #6

name: Downgraded Release
on:
push:
tags:
- '*'
jobs:
downgrade_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/downgrade
# clear the dev files
- run: find . -type f ! -name 'bin' ! -name 'src' ! -name 'vendor' ! -name 'composer.json' ! -name 'composer.lock' ! -name 'README.md' ! -name 'vendor' -mindepth 1 -delete
- run: find . -type d -empty -delete
# setup git user
- run: |
git config user.email "[email protected]"
git config user.name "GitHub Action"
# publish to the same repository with a new tag
- name: "Tag Downgraded Code"
run: |
# separate a "git add" to add untracked (new) files too
git add --all
git commit -m "Release PHP 7.4 downgraded"
# force push tag, so there is only 1 version
git tag "${GITHUB_REF#refs/tags/}" --force
git push origin "${GITHUB_REF#refs/tags/}" --force