Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement/resolve release deploy action warnings #97

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

MaxwellGarceau
Copy link
Collaborator

@MaxwellGarceau MaxwellGarceau commented Dec 27, 2024

Description of the Change

Resolve GH warnings during the Deploy to WordPress.org GH action by changing the step that attaches the Mailchimp plugin files to the Github release to use softprops/action-gh-release@v2.

Description of functionality

GH action triggers on publish of a release. The action deploys the repo to the wordpress.org plugin repo and then updates the GH release with the WP plugin zip file.

Closes #60

How to test the Change

Production testing

Verify the Mailchimp WP plugin zip file is added to the release
  • Publish a new release
  • Verify that the WP plugin zip file named mailchimp.zip is added to the release you've just created (via the GH action)
  • Download mailchimp.zip and verify that all expected production plugin files exist
(production only) Verify that the Mailchimp WP Plugin is published

Non production testing

test-gh-deploy-to-wordpress.mov
  • Fork the mailchimp/wordpress repo
  • Create a new release (remember the tag you used)
  • Cancel the GH action that's triggered on publish
    • NOTE: This will fail no matter what since the SVN credentials are not present in the forked repo
    • NOTE: You will have to enable Github actions on a forked repo so this may not even run at all
  • Manually run the "(delete after testing is done) - Test "Deploy to WordPress.org"" workflow using the tag of the release you created
  • After the workflow finishes check the release you published. There should now be a mailchimp.zip file attached to the release
  • Download mailchimp.zip and verify that all expected production plugin files exist
  • In the Github Action summary there should be no deprecation warnings
    Screenshot 2024-12-27 at 2 53 50 PM

Changelog Entry

Changed - Updated Github action step for generating the release assets (mailchimp.zip file)

Credits

Props @MaxwellGarceau

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change. - in the form of a test workflow file
  • All new and existing tests pass. Not relevant for Github action changes

@github-actions github-actions bot added this to the 1.7.0 milestone Dec 27, 2024
@MaxwellGarceau
Copy link
Collaborator Author

@dkotter, during my testing I saw that the "Deploy to WordPress.org" action will trigger on pre-releases as well. Based on the action, it seems like it should only run when a release is published.

We could exclude prereleases with something like this. What do you think?

jobs:
  tag:
    name: New release
    runs-on: ubuntu-latest
    if: ${{ !github.event.release.prerelease }} # Skip job if it is a pre-release

@@ -0,0 +1,74 @@
# TODO: THIS WORKFLOW FILE IS TO TEST ISSUE #60 "Resolve release deploy action warnings"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because the Deploy to Wordpress.org Github action only runs on the publish event I've added a separate file that comments out the WordPress Plugin Deploy step and generates the zip file for the replaced step last.

This can be deleted once the PR passes code review and QA.

@MaxwellGarceau
Copy link
Collaborator Author

Calling out an annotation warning in the Deploy to WordPress.org action. I don't think any action is required here as this is just an informational message letting us know that ubuntu-latest will be using ubuntu-24.04 soon.

Screenshot 2024-12-27 at 2 53 50 PM

@MaxwellGarceau MaxwellGarceau marked this pull request as ready for review December 27, 2024 20:02
@github-actions github-actions bot added the needs:code-review This requires code review. label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:code-review This requires code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolve release deploy action warnings
1 participant