Skip to content

3.0.0-RC3

3.0.0-RC3 #24

Workflow file for this run

# GitHub Action: whenever creating a new release of the source code,
# also create a release of the installable plugin.
# Steps to execute:
# - Checkout the source code
# - Run "composer install" to download all dependencies under vendor/
# - Create a .zip file, excluding:
# - All hidden files (.git, .gitignore, etc)
# - All development files, ending in .dist
# - All composer files <= after installing dependencies, no need for them anymore
# - Markdown files concerning development
# - Folder build/ <= created only to store the .zip file
# - Folder dev-helpers/ <= not needed for the plugin
# - Upload the .zip file as an artifact to the action (this step is possibly optional)
# - Upload the .zip file as a release, for download
name: Generate Installable Plugin, and Upload as Release Asset
on:
release:
types: [published]
permissions:
contents: write
jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Create artifact
run: |
mkdir -p build
zip -1 -X -r build/${{ github.event.repository.name }}.zip . -x *.git* node_modules/\* .* "*/\.*" "*/.git*" "*/.DS_Store" CODE_OF_CONDUCT.md CONTRIBUTING.md ISSUE_TEMPLATE.md PULL_REQUEST_TEMPLATE.md CLAUDE.md AGENTS.md *.dist *.yml *.neon composer.* package.json package-lock.json "dev-helpers/*" "build/*" "wporg-assets/*" "docs/*" "phpunit/*" phpstan-bootstrap.php build-assets.js
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: build/${{ github.event.repository.name }}.zip