-
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.
Set test npm publishing workflow to trigger when Gutenberg RC1 is out
- Loading branch information
Showing
2 changed files
with
17 additions
and
44 deletions.
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 |
---|---|---|
|
@@ -16,41 +16,6 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
test-npm-publish: | ||
name: Publish WordPress packages to npm (Work In Progress) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout (for CLI) | ||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 | ||
with: | ||
path: main | ||
|
||
- name: Checkout (for publishing) | ||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 | ||
with: | ||
path: publish | ||
ref: trunk | ||
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 | ||
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 | ||
with: | ||
node-version: 14 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Publish packages to npm | ||
run: | | ||
cd main | ||
npm ci | ||
./bin/plugin/cli.js npm-next --ci --repository-path ../publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
check: | ||
name: All | ||
runs-on: ubuntu-latest | ||
|
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 |
---|---|---|
|
@@ -95,33 +95,41 @@ jobs: | |
path: ./changelog.txt | ||
|
||
npm-publish: | ||
name: Publish WordPress packages to npm (Work In Progress) | ||
name: Publish WordPress packages to npm | ||
runs-on: ubuntu-latest | ||
needs: update-changelog | ||
if: ${{ github.event.release.prerelease && endsWith( github.event.release.tag_name, '-rc.1' ) && github.event.release.assets[0] }} | ||
steps: | ||
- name: Checkout | ||
- name: Checkout (for CLI) | ||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 | ||
with: | ||
path: main | ||
ref: trunk | ||
|
||
- name: Checkout (for publishing) | ||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 | ||
with: | ||
path: publish | ||
ref: trunk | ||
token: ${{ secrets.GUTENBERG_TOKEN }} | ||
|
||
- name: Configure git user name and email | ||
- 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 | ||
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 | ||
with: | ||
node-version: 14 | ||
cache: npm | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Publish packages to npm | ||
run: npm whoami | ||
- name: Publish packages to npm ("next" dist-tag) | ||
run: | | ||
cd main | ||
npm ci | ||
./bin/plugin/cli.js npm-next --semver minor --ci --repository-path ../publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
|