Skip to content

🚀 Release to WordPress.org plugins repo #4

🚀 Release to WordPress.org plugins repo

🚀 Release to WordPress.org plugins repo #4

Workflow file for this run

name: 🚀 Release to WordPress.org plugins repo
on:
release:
types: [published, edited]
jobs:
tag:
name: 🎉 New Release
runs-on: ubuntu-latest
env:
PUSH_TO_SVN: 'no'
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: composer, wp-cli
- name: Install Composer dependencies in build
run: composer install --no-dev --no-interaction
- name: Dump autoload
run: composer dump-autoload --classmap-authoritative -o
- name: Install WP-CLI dist-archive
run: wp package install wp-cli/dist-archive-command
- name: Create ZIP file
run: wp dist-archive . ./${{ github.event.release.name }}.zip --plugin-dirname=product-specifications
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "./${{ github.event.release.name }}.zip"
asset_name: ${{ github.event.release.name }}.zip
asset_content_type: application/zip
- name: Check release type
run: |
if [[ "${{github.event.release.tag_name}}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "PUSH_TO_SVN=yes" >> $GITHUB_ENV
fi
- name: 🚀 WordPress Plugin Deploy
id: deploy
if: ${{env.PUSH_TO_SVN == 'yes'}}
uses: 10up/action-wordpress-plugin-deploy@master
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
- name: 🚀 WordPress Plugin Deploy
id: deploy

Check failure on line 60 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / 🚀 Release to WordPress.org plugins repo

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 60, Col: 13): The identifier 'deploy' may not be used more than once within the same scope.
uses: 10up/action-wordpress-plugin-deploy@master
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SLUG: email-verification-on-signups