Skip to content

Commit

Permalink
Revert debug changes
Browse files Browse the repository at this point in the history
Revert changes I made in order to test end-to-end from a test fork.
  • Loading branch information
fullofcaffeine authored and ockham committed Mar 22, 2023
1 parent 8cd1231 commit d685abb
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 11 deletions.
43 changes: 42 additions & 1 deletion .github/workflows/build-plugin-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GUTENBERG_TOKEN }}

- name: Compute old and new version
id: get_version
Expand Down Expand Up @@ -298,3 +298,44 @@ jobs:
asset_path: ./gutenberg.zip
asset_name: gutenberg.zip
asset_content_type: application/zip

npm-publish:
name: Publish WordPress packages to npm
runs-on: ubuntu-latest
environment: WordPress packages
needs: [bump-version, build]
if: ${{ endsWith( needs.bump-version.outputs.new_version, '-rc.1' ) }}
steps:
- name: Checkout (for CLI)
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
path: main
ref: trunk

- name: Checkout (for publishing)
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
path: publish
# Later, we switch this branch in the script that publishes packages.
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 gutenberg@wordpress.org
- name: Setup Node.js
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version-file: 'main/.nvmrc'
registry-url: 'https://registry.npmjs.org'

- name: Publish packages to npm ("latest" dist-tag)
run: |
cd main
npm ci
./bin/plugin/cli.js npm-latest --semver minor --ci --repository-path ../publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
14 changes: 4 additions & 10 deletions .github/workflows/upload-release-to-plugin-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ jobs:
latest_stable_tag: ${{ steps.get_latest_stable_tag.outputs.latest_stable_tag }}

steps:
- uses: hmarr/debug-action@v2
- name: Get latest stable ta
- name: Get latest stable tag
id: get_latest_stable_tag
run: |
curl \
Expand All @@ -30,7 +29,6 @@ jobs:
release_branch: ${{ steps.get_release_branch.outputs.release_branch }}

steps:
- uses: hmarr/debug-action@v2
- name: Compute release branch name
id: get_release_branch
env:
Expand All @@ -57,12 +55,11 @@ jobs:
label: release

steps:
- uses: hmarr/debug-action@v2
- name: Checkout code
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
ref: ${{ matrix.branch }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GUTENBERG_TOKEN }}

- name: Update the Changelog to include the release notes
run: |
Expand Down Expand Up @@ -123,14 +120,13 @@ jobs:
endsWith( github.ref, needs.compute-latest-stable.outputs.latest_stable_tag ) &&
!github.event.release.prerelease && github.event.release.assets[0]
env:
PLUGIN_REPO_URL: 'http://caffeine.ngrok.io/svn/gutenberg'
PLUGIN_REPO_URL: 'https://plugins.svn.wordpress.org/gutenberg'
STABLE_VERSION_REGEX: '[0-9]\+\.[0-9]\+\.[0-9]\+\s*'
SVN_USERNAME: ${{ secrets.svn_username }}
SVN_PASSWORD: ${{ secrets.svn_password }}
VERSION: ${{ github.event.release.name }}

steps:
- uses: hmarr/debug-action@v2
- name: Check out Gutenberg trunk from WP.org plugin repo
run: svn checkout "$PLUGIN_REPO_URL/trunk" --username "$SVN_USERNAME" --password "$SVN_PASSWORD"

Expand Down Expand Up @@ -188,15 +184,13 @@ jobs:
!endsWith( github.ref, needs.compute-latest-stable.outputs.latest_stable_tag ) &&
!github.event.release.prerelease && github.event.release.assets[0]
env:
PLUGIN_REPO_URL: 'http://caffeine.ngrok.io/svn/gutenberg'
PLUGIN_REPO_URL: 'https://plugins.svn.wordpress.org/gutenberg'
STABLE_VERSION_REGEX: '[0-9]\+\.[0-9]\+\.[0-9]\+\s*'
SVN_USERNAME: ${{ secrets.svn_username }}
SVN_PASSWORD: ${{ secrets.svn_password }}
VERSION: ${{ github.event.release.name }}

steps:
- uses: hmarr/debug-action@v2

- name: Check out Gutenberg branches from WP.org plugin repo
run: svn checkout "$PLUGIN_REPO_URL/branches" --username "$SVN_USERNAME" --password "$SVN_PASSWORD"

Expand Down

0 comments on commit d685abb

Please sign in to comment.