Dev/delivery 63802/ci modification #29
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: Prepare plugin for production | |
on: | |
pull_request: | |
types: | |
- opened | |
branches: | |
- 'master' | |
jobs: | |
Prepare-Plugin-For-Production: | |
if: startsWith(github.head_ref, 'releases/') | |
name: Prepare for production after testing the plugin | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: PR branch check | |
uses: mdecoleman/[email protected] | |
id: vars | |
with: | |
repo-token: ${{ secrets.CI_GITHUB_TOKEN }} | |
- name: Determine release tag and release branch | |
run: | | |
TAG=$(echo "${{ steps.vars.outputs.branch }}" | grep -Eo '[0-9]+.[0-9]+.[0-9]+') | |
echo "from branch: ${{github.head_ref}}" | |
echo "PLUGIN_VERSION=$TAG" >> $GITHUB_ENV | |
- name: run script | |
run: bash .github/bash_scripts/release.sh ${{env.PLUGIN_VERSION}} | |
- name: Commit and Push | |
run : | | |
git add . | |
git commit -m"Commited from github action - prepaing the repo for production." | |
git push origin HEAD:${{ steps.vars.outputs.branch }} --force |