58b2ef6305
Some checks failed
Blocks Playwright Tests / Shard ${{ matrix.shardIndex }} of ${{ matrix.shardTotal }} (1, 10) (push) Failing after 11m1s
Blocks Playwright Tests / Shard ${{ matrix.shardIndex }} of ${{ matrix.shardTotal }} (10, 10) (push) Failing after 10m59s
Blocks Playwright Tests / Shard ${{ matrix.shardIndex }} of ${{ matrix.shardTotal }} (2, 10) (push) Failing after 10m58s
Blocks Playwright Tests / Shard ${{ matrix.shardIndex }} of ${{ matrix.shardTotal }} (5, 10) (push) Failing after 10m52s
Blocks Playwright Tests / Shard ${{ matrix.shardIndex }} of ${{ matrix.shardTotal }} (3, 10) (push) Failing after 17m10s
Blocks Playwright Tests / Shard ${{ matrix.shardIndex }} of ${{ matrix.shardTotal }} (4, 10) (push) Failing after 23m58s
Blocks Playwright Tests / Shard ${{ matrix.shardIndex }} of ${{ matrix.shardTotal }} (6, 10) (push) Failing after 24m0s
Blocks Playwright Tests / Shard ${{ matrix.shardIndex }} of ${{ matrix.shardTotal }} (7, 10) (push) Failing after 24m26s
Blocks Playwright Tests / Shard ${{ matrix.shardIndex }} of ${{ matrix.shardTotal }} (8, 10) (push) Failing after 24m35s
Blocks Playwright Tests / Shard ${{ matrix.shardIndex }} of ${{ matrix.shardTotal }} (9, 10) (push) Failing after 8m7s
Blocks Playwright Tests / Create GitHub issues for flaky tests (push) Has been skipped
Blocks Playwright Tests / Merge Artifacts (push) Has been skipped
Nightly builds / Nightly builds (push) Failing after 13m59s
Process stale issues / stale (push) Successful in 22s
Storybook GitHub Pages / deploy (push) Has been skipped
This PR bumps the pnpm version requirements and adds automatic corepack enablement in git-hooks to enable out-of-the-box pnpm version migration. --------- Co-authored-by: rjchow <me@rjchow.com> Co-authored-by: github-actions <github-actions@github.com> |
||
---|---|---|
.. | ||
commands/release-post | ||
lib | ||
templates | ||
.env.sample | ||
.prettierignore | ||
index.ts | ||
package.json | ||
program.ts | ||
README.md | ||
tsconfig.json |
Release Post Generator CLI tool
This is a cli tool designed to generate draft release posts for WooCommerce. Posts generated via the tool will be draft posted to https://developer.woocommerce.com.
You can also generate an HTML representation of the post if you don't have access to a WordPress.com auth token.
Setup
- Make sure
pnpm i
has been run in the monorepo. - Make sure you have added a
.env
file with the env variables set. WCCOM_TOKEN is optional if you're using--outputOnly
, but theGITHUB_ACCESS_TOKEN
is required. If you need help generating a token see the docs. To silence all CLI output, setLOGGER_LEVEL
to"silent"
. - Note that the env file should live at the same path that you're running the command from.
- Run the tool via the npm script, e.g.
pnpm release-post release "6.8.0" --outputOnly
- For more help on individual options, run the help
pnpm release-post <command> --help
. e.g.pnpm release-post rc --help
Publishing Draft Posts
This tool will publish draft posts to https://developer.woocommerce.com
for you if you omit the --outputOnly
flag. There is some minimal first time setup for this though:
- Create an app on WordPress.com here.
- Recommended settings:
- Name can be anything
- Description can be left blank
- Website URL just put
http://localhost
- Redirect URLs, by default you should add:
http://localhost:3000/oauth
- JavaScript Origins put
http://localhost
- Type - choose "Web"
- Once your app is created you can go back to the app list and click "manage app".
- Take note of the
client secret
and theclient id
. - In your
.env
file add the client secret to theWPCOM_OAUTH_CLIENT_SECRET
variable and the client id to theWPCOM_OAUTH_CLIENT_ID
variable.
Generating Just a Contributors List
If you don't have a final release yet you can generate an HTML contributors list that you can copy paste into a blank post.
To do that simply run pnpm release-post contributors "<currentVersion>" "<previousVersion>"
Advanced
If you can't run anything on your localhost port 3000 you may want to override the redirect uri for oauth.
Steps:
- Add your preferred redirect URI to the
WPCOM_OAUTH_REDIRECT_URI
variable in.env
. e.g.http://localhost:4321/oauth
- When creating your app on WordPress.com make sure the redirect URL you set matches the one set in
.env