Move downgrade logic into its own file #1
Workflow file for this run
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: Downgraded Release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
downgrade_release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: ./.github/actions/downgrade | |
# clear the dev files | |
- run: find . ! -name 'bin' ! -name 'src' ! -name 'vendor' ! -name 'composer.json' ! -name 'composer.lock' ! -name 'README.md' -mindepth 1 -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 |