Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add back manual watched branches step #2423

Open
wants to merge 3 commits into
base: unstable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions .github/workflows/create-stable-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,15 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Update GitHub Actions files
run: |
sed -i '/branches:/a\ - ${{ github.event.inputs.version }}' .github/workflows/changesets-reminder.yml
sed -i '/branches:/a\ - ${{ github.event.inputs.version }}' .github/workflows/deploy.yml
node-version: "16"

- name: Create new branch
run: |
git checkout -b ${{ github.event.inputs.version }} origin/unstable
git push -u origin ${{ github.event.inputs.version }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.SHOPIFY_GH_ACCESS_TOKEN }}
commit-message: 'Add ${{ github.event.inputs.version }} to watched branches'
title: 'Add ${{ github.event.inputs.version }} to watched branches'
body: 'This PR adds the new stable version ${{ github.event.inputs.version }} to the list of watched branches in the changesets-reminder and deploy GitHub actions.'
branch: 'update-watched-branches-${{ github.event.inputs.version }}'
base: '${{ github.event.inputs.version }}'

Comment on lines -36 to -45
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are removing the PR that gets created, but you still create the branch with the updated GH action files? I'm not sure if I understand correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a different PR: to update the Github action yml files. It requires some special permissions in order for a GH app to edit action yml.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean that you are still actually updating the files in the workflow, so I think you'd want to remove that too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh I see what you mean. Yes good call, we don't need that either.

# Note: The following steps currently fail. I am working with the infra team to see if we can
# get a token with the requisite permissions.
- name: Create branch protection rule
uses: octokit/[email protected]
with:
Expand Down
1 change: 1 addition & 0 deletions documentation/versions-and-deploys.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Like the `unstable` branch, the `internal` branch also publishes snapshot releas

To create a new stable version, you will need to follow these steps:

1. Add the new stable calver version `YYYY-MM` to the list of watched branches in the [`changesets-reminder`](https://github.com/Shopify/ui-extensions/blob/unstable/.github/workflows/changesets-reminder.yml) and [`deploy`](https://github.com/Shopify/ui-extensions/blob/unstable/.github/workflows/deploy.yml) GitHub actions.
1. Run the "create stable version" action.
1. Pull down the branch that that was created by the GitHub action (it should have the name `changeset-release/{{BRANCH_NAME}}`). Instead of the patch version changes that were made by the action, update the version of all packages manually to be the first patch release of a new version range. For example, if you are creating a `2025-01` API version, you will set the package versions of all packages to `2025.1.0`. Apply this change to `packages/ui-extensions/package.json`, `packages/ui-extensions/CHANGELOG.md`, `packages/ui-extensions-react/package.json`, and `packages/ui-extensions-react/CHANGELOG.md`.
> Note: do not update the root-level `package.json`.
Expand Down
Loading