Skip to content

Conversation

@marcusquinn
Copy link
Contributor

Add GitHub Workflow for Automatic Plugin Releases

Description

This PR adds a GitHub Actions workflow that automatically builds and releases the plugin when a new tag is pushed to the repository. This simplifies the release process and ensures consistent builds.

Changes Made

  1. Added .github/workflows/release.yml with the release workflow configuration
  2. Updated .github/workflows/README.md to include documentation about the release workflow

How It Works

  1. When a new tag is pushed (in the format v*.*.*), the workflow is triggered
  2. The workflow checks out the code, sets up PHP and Node.js
  3. It verifies that the version in the tag matches the version in the plugin files
  4. It runs the build process using npm run build
  5. It creates a ZIP file of the plugin
  6. It creates a GitHub release with the ZIP file attached

Usage

To create a new release:

  1. Update the version number in:

    • wp-multisite-waas.php (the Version: header)
    • readme.txt (the Stable tag: field)
    • package.json (the version field)
  2. Commit these changes

  3. Create and push a new tag:

    git tag v1.2.3
    git push origin v1.2.3
    
  4. The workflow will automatically create a release with the built plugin

Note on Previous PR

This PR is a focused version of PR #26, which included many additional files and changes. Based on the discussion in PR #26, I've created this new PR with only the essential files needed for the GitHub workflow for automatic plugin releases.

Copy link
Collaborator

@superdav42 superdav42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's set it to draft and prerelease at least until I'm confident it's going to work correctly. Do you know a way to test it without merging it first?

@superdav42 superdav42 merged commit 3bb4d02 into Multisite-Ultimate:main Apr 24, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants