-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into release-3.10
- Loading branch information
Showing
26 changed files
with
1,469 additions
and
209 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
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
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Change Prerelease Tag | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: "Branch name" | ||
type: string | ||
default: "release-" | ||
required: true | ||
tag: | ||
description: "New tag name" | ||
type: string | ||
default: "rc" | ||
required: true | ||
|
||
jobs: | ||
change_prerelease_tag: | ||
name: Changesets Update Prerelease Tag | ||
runs-on: ubuntu-latest | ||
# Allow GITHUB_TOKEN to have write permissions | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: github-actions-bot-app-token | ||
with: | ||
app-id: 819772 | ||
private-key: ${{ secrets.APOLLO_GITHUB_ACTIONS_BOT_PRIVATE_KEY }} | ||
|
||
# Check out the repository, using the Github Actions Bot app's token so | ||
# that we can push later. | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ steps.github-actions-bot-app-token.outputs.token }} | ||
# Checkout release branch entered when workflow was kicked off | ||
ref: ${{ github.event.inputs.branch }} | ||
# Fetch entire git history so Changesets can generate changelogs | ||
# with the correct commits | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js 20.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Write latest version to package.json and package-lock.json | ||
run: | | ||
version=$(npm show @apollo/client version) | ||
npm pkg set version="$version" | ||
npm i | ||
- name: Update prerelease tag in .changeset/pre.json | ||
uses: restackio/[email protected] | ||
with: | ||
file: .changeset/pre.json | ||
fields: '{"tag": "${{github.event.inputs.tag}}"}' | ||
|
||
- name: Commit and push changes | ||
env: | ||
TAG: ${{ github.event.inputs.tag }} | ||
run: | | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config user.name "github-actions[bot]" | ||
git add -A | ||
git commit -m "Prepare for "$TAG" release" | ||
git push |
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 |
---|---|---|
|
@@ -18,9 +18,18 @@ jobs: | |
contents: write | ||
|
||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: github-actions-bot-app-token | ||
with: | ||
app-id: 819772 | ||
private-key: ${{ secrets.APOLLO_GITHUB_ACTIONS_BOT_PRIVATE_KEY }} | ||
|
||
# Check out the repository, using the Github Actions Bot app's token so | ||
# that we can push later. | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ steps.github-actions-bot-app-token.outputs.token }} | ||
# Checkout release branch entered when workflow was kicked off | ||
ref: ${{ github.event.inputs.branch }} | ||
# Fetch entire git history so Changesets can generate changelogs | ||
|
@@ -32,28 +41,19 @@ jobs: | |
with: | ||
node-version: 20.x | ||
|
||
- name: Get latest tagged version | ||
id: previoustag | ||
uses: WyriHaximus/github-action-get-previous-tag@v1 | ||
|
||
- name: Remove 'v' prefix from version number (e.g. v1.0.0) | ||
uses: mad9000/actions-find-and-replace-string@5 | ||
id: formatversion | ||
with: | ||
source: ${{ steps.previoustag.outputs.tag }} | ||
find: "v" | ||
replace: "" | ||
|
||
- name: Write previous version to package.json | ||
uses: jaywcjlove/[email protected] | ||
with: | ||
version: ${{ steps.formatversion.outputs.value }} | ||
- name: Write latest version to package.json and package-lock.json | ||
run: | | ||
version=$(npm show @apollo/client version) | ||
npm pkg set version="$version" | ||
npm i | ||
- name: Remove pre.json | ||
run: npx rimraf .changeset/pre.json | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: Exit prerelease mode | ||
# Commit these changes to the branch workflow is running against | ||
branch: ${{ github.event.inputs.branch }} | ||
- name: Commit and push changes | ||
run: | | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config user.name "github-actions[bot]" | ||
git add -A | ||
git commit -m "Exit prerelease mode" | ||
git push |
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
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
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
Oops, something went wrong.