-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workflow: Fix the issue with npm publishing for WP major version (#54088
- Loading branch information
Showing
1 changed file
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,31 +30,49 @@ jobs: | |
environment: WordPress packages | ||
steps: | ||
- name: Checkout (for CLI) | ||
if: ${{ github.event.inputs.release_type != 'wp' }} | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
with: | ||
path: cli | ||
ref: trunk | ||
|
||
- name: Checkout (for publishing) | ||
if: ${{ github.event.inputs.release_type != 'wp' }} | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
with: | ||
path: publish | ||
# Later, we switch this branch in the script that publishes packages. | ||
ref: trunk | ||
token: ${{ secrets.GUTENBERG_TOKEN }} | ||
|
||
- name: Checkout (for publishing WP major version) | ||
if: ${{ github.event.inputs.release_type == 'wp' && github.event.inputs.wp_version }} | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
with: | ||
path: publish | ||
ref: wp/${{ github.event.inputs.wp_version }} | ||
token: ${{ secrets.GUTENBERG_TOKEN }} | ||
|
||
- name: Configure git user name and email (for publishing) | ||
run: | | ||
cd publish | ||
git config user.name "Gutenberg Repository Automation" | ||
git config user.email [email protected] | ||
- name: Setup Node.js | ||
if: ${{ github.event.inputs.release_type != 'wp' }} | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | ||
with: | ||
node-version-file: 'cli/.nvmrc' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Setup Node.js (for WP major version) | ||
if: ${{ github.event.inputs.release_type == 'wp' && github.event.inputs.wp_version }} | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | ||
with: | ||
node-version-file: 'publish/.nvmrc' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Publish development packages to npm ("next" dist-tag) | ||
if: ${{ github.event.inputs.release_type == 'development' }} | ||
run: | | ||
|
@@ -73,7 +91,7 @@ jobs: | |
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Publish packages to npm for WP major ("wp/${{ github.event.inputs.wp_version || 'X.Y' }}" dist-tag) | ||
- name: Publish packages to npm for WP major version ("wp/${{ github.event.inputs.wp_version || 'X.Y' }}" dist-tag) | ||
if: ${{ github.event.inputs.release_type == 'wp' && github.event.inputs.wp_version }} | ||
run: | | ||
cd publish | ||
|