Skip to content

Comments

bug: Fixes for Github workflow for faustwp releases#2066

Merged
colinmurphy merged 11 commits intocanaryfrom
bug-fix-github-workflow-faustwp-issues
Mar 10, 2025
Merged

bug: Fixes for Github workflow for faustwp releases#2066
colinmurphy merged 11 commits intocanaryfrom
bug-fix-github-workflow-faustwp-issues

Conversation

@colinmurphy
Copy link
Member

Tasks

  • I have signed a Contributor License Agreement (CLA) with WP Engine.
  • If a code change, I have written testing instructions that the whole team & outside contributors can understand.
  • I have written and included a comprehensive changeset to properly document the changes I've made.

Description

Solves #2064

This makes the following adjustments to the faustwp release.

  1. Correct names for the zips e.g. faustwp.1.8.1.zip
  2. Zip up faustwp not dist/faustwp
  3. Attach to canary so it gets added to the release.
  4. Automated the WPE info.json file changes and attach to the release. (See test example - https://github.com/wpengine/faustjs/actions/runs/13684709005/job/38265302570)

Note We cannot fully test until this is merged and released but we did add some test actions to verify it all worked.

Related Issue(s):

#2064

Testing

  1. A local bash script
#!/bin/bash

# Set environment variables
PLUGIN_DIR="$(pwd)/plugins/faustwp"
SLUG="faustwp"
VERSION="4.8.1"

#### Testing info.json ####

	# Fetch the info.json file and set variables
	curl -sSL "https://wpe-plugin-updates.wpengine.com/faustwp/info.json" -o info.json
	current_time=$(date -u +"%Y-%m-%d %-I:%M%p GMT")
	download_link="https://wpe-plugin-updates.wpengine.com/faustwp/faustwp.${VERSION}.zip"

	# Update the info.json file with the new version and download link
	jq \
		--arg version "${VERSION}" \
		--arg last_updated "$current_time" \
		--arg download_link "$download_link" \
		--arg new_version "${VERSION}" \
		--arg new_download_link "https://wpe-plugin-updates.wpengine.com/faustwp/faustwp.${VERSION}.zip" \
		'.versions = {($new_version): $new_download_link} + .versions | .version=$version | .last_updated=$last_updated | .download_link=$download_link' \
		info.json > info.json.tmp && mv info.json.tmp info.json
  1. A test Github action - https://github.com/wpengine/faustjs/actions/runs/13684709005/job/38265302570

Screenshots

Screenshot 2025-03-05 at 20 26 59 Screenshot 2025-03-05 at 20 27 20 Screenshot 2025-03-05 at 20 27 39

Documentation Changes

N/A

Dependant PRs

N/A

1. Renamed files correctly e.g. faustwp.1.8.1.zip
2. Fixed issue with zips attaching to a tag rather than the canary branch and creating another releae.
3. Fixed issue that the zip is using dist rather than faustwp as the directory to be zipped.
Added some automation for changes for the info.json for WPE updater.

Added a test debug to see if the info.json changes work as they did locally and outputting the content.
@colinmurphy colinmurphy marked this pull request as ready for review March 5, 2025 20:28
@colinmurphy colinmurphy requested a review from a team as a code owner March 5, 2025 20:28
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2025

📦 Next.js Bundle Analysis for @faustwp/getting-started-example

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@changeset-bot
Copy link

changeset-bot bot commented Mar 6, 2025

🦋 Changeset detected

Latest commit: 5437f51

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@faustwp/wordpress-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@colinmurphy colinmurphy marked this pull request as draft March 6, 2025 13:18
@colinmurphy colinmurphy marked this pull request as ready for review March 6, 2025 13:34
@colinmurphy colinmurphy merged commit 700f96e into canary Mar 10, 2025
18 checks passed
@colinmurphy colinmurphy deleted the bug-fix-github-workflow-faustwp-issues branch March 10, 2025 09:52
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