Release Plugin #6
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: Release Plugin | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
- name: Install Composer dependencies | |
run: composer install --no-dev --optimize-autoloader | |
- name: Zip project | |
run: zip -r wordpress-plugin.zip . -x '*.git*' | |
- name: Upload app archive to workflow | |
uses: actions/upload-artifact@v3 | |
with: | |
name: WordPress-Plugin | |
path: wordpress-plugin.zip | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: artifacts | |
- name: Create Release | |
uses: marvinpinto/action-automatic-releases@v1.2.1 | |
with: | |
repo_token: "${{ secrets.commit_secret }}" | |
draft: false | |
prerelease: false | |
title: "Latest Release" | |
automatic_release_tag: "v0.1.4" | |
files: | | |
${{ github.workspace }}/artifacts/WordPress-Plugin | |
# - name: Submit to WordPress Plugin Store | |
# env: | |
# WORDPRESS_USERNAME: ${{ secrets.WORDPRESS_USERNAME }} | |
# WORDPRESS_PASSWORD: ${{ secrets.WORDPRESS_PASSWORD }} | |
# run: | | |
# curl -u $WORDPRESS_USERNAME:$WORDPRESS_PASSWORD \ | |
# -F 'plugin_name=plugin-name' \ | |
# -F 'zip_file=@plugin-name.zip' \ | |
# https://api.wordpress.org/plugins/add |