Build and deploy to WordPress.org #49
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: Build and deploy to WordPress.org | |
on: | |
release: | |
types: [published] | |
jobs: | |
tag: | |
name: New tag | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@master | |
# Build the plugin with dev dependencies to scope the dependency packages. | |
- name: Composer Install (Dev) | |
run: composer install | |
# Build the plugin for release. | |
- name: Composer Install (Prod) | |
run: composer install --no-dev | |
# Install and build Block release. | |
- name: Build block release versions. | |
run: | | |
npm ci | |
npm run build | |
# Deploy the plugin to WordPress.org | |
- name: WordPress Plugin Deploy | |
id: deploy | |
uses: 10up/action-wordpress-plugin-deploy@stable | |
with: | |
generate-zip: true | |
env: | |
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
SLUG: klarna-payments-for-woocommerce | |
# Add release assets to the Github release tag. | |
- 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: ${{ steps.deploy.outputs.zip-path }} | |
asset_name: ${{ github.event.repository.name }}.zip | |
asset_content_type: application/zip |