Fix deprecated dynamic properties in new PHP versions (#297) #31
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: Create release and upload to Magento marketplace | |
on: | |
push: | |
tags: | |
- "*.*.*" | |
jobs: | |
create-release: | |
if: startsWith(github.ref, 'refs/tags/') | |
name: Build & release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Set Env Vars | |
id: vars | |
run: | | |
tag=${GITHUB_REF#refs/*/} | |
echo "tag=$tag" >> $GITHUB_ENV | |
zip_path="doofinder-magento2.zip" | |
echo "zip_path=$zip_path" >> $GITHUB_ENV | |
tag_message=$(git tag -l --format='%(contents)' ${GITHUB_REF#refs/*/}) | |
echo "tag_message<<EOF" >> $GITHUB_ENV | |
echo "$tag_message" >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
- name: Build | |
run: git archive --format=zip -o $zip_path ${{ env.tag }} | |
- name: Setup PHP with PECL extension | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.4' | |
extensions: curl | |
- name: Create Magento marketplace release | |
id: magento_release | |
run: | | |
php .github/workflows/scripts/magento-release.php ${{ env.tag }} "${{ env.tag_message }}" ${{ secrets.ADOBE_APP_ID }} ${{ secrets.ADOBE_SECRET }} | |
code=$(head -n 1 release_result.txt) | |
if [[ $code != 200 ]] | |
then | |
echo "The Release to marketplace failed" | |
exit 1; | |
fi | |
- name: Create release & upload asset | |
uses: softprops/action-gh-release@v1 | |
with: | |
prerelease: true | |
files: ${{ env.zip_path }} | |
name: Doofinder Site Search ${{ env.tag }} |