Skip to content

Split staging release script into 2 parts #6339

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

Merged
merged 2 commits into from
Jun 9, 2022
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/release-log.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
branches:
- release
- v8-releasebranch
- '*-releasebranch'

jobs:
release:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Create Release PR

on:
push:
branches:
- release
- '*-releasebranch'

jobs:
release:
name: Create Release PR
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 14.x
uses: actions/setup-node@master
with:
node-version: 14.x

- name: Install Dependencies
run: yarn

# Ensures a new @firebase/app is published with every release.
# This keeps the SDK_VERSION variable up to date.
- name: Add a changeset for @firebase/app
# pull master so changeset can diff against it
run: |
git pull -f --no-rebase origin master:master
yarn ts-node-script scripts/ci/add_changeset.ts
- name: Create Release Pull Request
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.OSS_BOT_GITHUB_TOKEN }}
21 changes: 3 additions & 18 deletions .github/workflows/release-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,20 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
let branch = context.ref.replace("refs/heads/", "")
await github.rest.repos.merge({
owner: context.repo.owner,
repo: context.repo.repo,
base: 'release',
base: branch,
head: 'master'
})
- name: Checkout release branch (with history)
- name: Checkout current branch (with history)
uses: actions/checkout@master
with:
# Release script requires git history and tags.
fetch-depth: 0
ref: release
- name: Yarn install
run: yarn
# Ensures a new @firebase/app is published with every release.
# This keeps the SDK_VERSION variable up to date.
- name: Add a changeset for @firebase/app
# pull master so changeset can diff against it
run: |
git pull -f --no-rebase origin master:master
yarn ts-node-script scripts/ci/add_changeset.ts
- name: Create Release Pull Request
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.OSS_BOT_GITHUB_TOKEN }}
- name: Go back to release branch
# changesets/action created and checked out a new branch
# return to `release` branch.
run: git checkout release
- name: Publish to NPM
# --skipTests No need to run tests
# --skipReinstall Yarn install has already been run
Expand Down