Skip to content

Create staging release workflow #6279

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 4 commits into from
May 23, 2022
Merged

Create staging release workflow #6279

merged 4 commits into from
May 23, 2022

Conversation

hsubox76
Copy link
Contributor

Moving as many release tasks as possible out of local script and into Github Actions.

Try creating a workflow for staging first. If all works well, make one for production in a future PR.

  • Merge master into release
  • Check out release branch
  • yarn install
  • Add changeset for @firebase/app to ensure that package is always published (this keeps the SDK_VERSION variable current)
  • Create release PR (the "Version Changes" PR - use changesets Github action to automatically do this)
  • Publish to NPM using wombat-dressing-room tokens
  • Launch E2E tests workflow (changed e2e-test.yml workflow to use a repository_dispatch trigger to make it easier to call from here)
  • Log staging info to Firebase release tracker (call a cloud function) - we should probably add some kind of auth check before launching this

CDN steps will be run separately and manually in google3 after the NPM publish is done.

@hsubox76 hsubox76 requested a review from allspain as a code owner May 16, 2022 19:18
@changeset-bot
Copy link

changeset-bot bot commented May 16, 2022

⚠️ No Changeset found

Latest commit: a18a745

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@hsubox76 hsubox76 marked this pull request as draft May 16, 2022 19:18
@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 16, 2022

Size Report 1

Affected Products

  • @firebase/firestore

    TypeBase (1a06d5d)Merge (6b76746)Diff
    browser253 kB257 kB+4.22 kB (+1.7%)
    esm5314 kB319 kB+4.96 kB (+1.6%)
    main506 kB515 kB+9.62 kB (+1.9%)
    module253 kB257 kB+4.22 kB (+1.7%)
    react-native253 kB257 kB+4.22 kB (+1.7%)
  • @firebase/firestore-lite

    TypeBase (1a06d5d)Merge (6b76746)Diff
    browser73.4 kB80.5 kB+7.04 kB (+9.6%)
    esm586.9 kB96.2 kB+9.35 kB (+10.8%)
    main126 kB135 kB+9.03 kB (+7.2%)
    module73.4 kB80.5 kB+7.04 kB (+9.6%)
    react-native73.6 kB80.7 kB+7.04 kB (+9.6%)
  • bundle

    12 size changes

    TypeBase (1a06d5d)Merge (6b76746)Diff
    firestore (Persistence)265 kB269 kB+3.91 kB (+1.5%)
    firestore (Query Cursors)204 kB208 kB+3.56 kB (+1.7%)
    firestore (Query)205 kB209 kB+3.56 kB (+1.7%)
    firestore (Read data once)194 kB197 kB+3.56 kB (+1.8%)
    firestore (Realtime updates)196 kB200 kB+3.56 kB (+1.8%)
    firestore (Transaction)178 kB181 kB+2.82 kB (+1.6%)
    firestore (Write data)177 kB181 kB+3.43 kB (+1.9%)
    firestore-lite (Query Cursors)67.8 kB67.8 kB+22 B (+0.0%)
    firestore-lite (Query)71.0 kB71.0 kB+22 B (+0.0%)
    firestore-lite (Read data once)55.4 kB55.4 kB+22 B (+0.0%)
    firestore-lite (Transaction)72.9 kB80.0 kB+7.05 kB (+9.7%)
    firestore-lite (Write data)58.1 kB65.2 kB+7.03 kB (+12.1%)

  • firebase

    TypeBase (1a06d5d)Merge (6b76746)Diff
    firebase-compat.js783 kB787 kB+4.12 kB (+0.5%)
    firebase-firestore-compat.js305 kB309 kB+4.12 kB (+1.4%)
    firebase-firestore-lite.js251 kB267 kB+15.9 kB (+6.3%)
    firebase-firestore.js825 kB837 kB+11.4 kB (+1.4%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/lrGbphU6Ol.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 16, 2022

Size Analysis Report 1

This report is too large (587,792 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/FZS02gqmvH.html

@google-oss-bot google-oss-bot added the doc-changes PRs that affect docs label May 16, 2022
Copy link
Member

@lahirumaramba lahirumaramba left a comment

Choose a reason for hiding this comment

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

Thanks Christina! Added a few comments.

NPM_TOKEN_API_DOCUMENTER: ${{ secrets.NPM_TOKEN_API_DOCUMENTER }}
CI: true
- name: Launch E2E tests workflow
uses: peter-evans/repository-dispatch@v2
Copy link
Member

Choose a reason for hiding this comment

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

This is a minor concern, but if we think there is a risk of passing tokens to a third party GHA, we could probably write our own action and host it in the same repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since it's pretty simple I changed it to just a curl.

OPERATOR=${{ github.actor }}
curl -X POST -H "Content-Type:application/json" \
-d "{\"version\":\"$BASE_VERSION\",\"tag\":\"$STAGING_VERSION\",\"date\":\"$DATE\",\"operator\":\"$OPERATOR\"}" \
https://us-central1-feature-tracker-8ca2b.cloudfunctions.net/logStaging
Copy link
Member

Choose a reason for hiding this comment

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

hmm should we store the endpoint in a secret?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yeah, that's the way to do it. In fact I already did so for a couple of other workflows and forgot.

OPERATOR=${{ github.actor }}
curl -X POST -H "Content-Type:application/json" \
-d "{\"version\":\"$BASE_VERSION\",\"tag\":\"$STAGING_VERSION\",\"date\":\"$DATE\",\"operator\":\"$OPERATOR\"}" \
https://us-central1-feature-tracker-8ca2b.cloudfunctions.net/logStaging
Copy link
Member

Choose a reason for hiding this comment

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

hmm should we store the endpoint in a secret?

@hsubox76 hsubox76 marked this pull request as ready for review May 18, 2022 18:02
Copy link
Contributor

@dwyfrequency dwyfrequency left a comment

Choose a reason for hiding this comment

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

LGTM

@hsubox76 hsubox76 merged commit dbf623f into master May 23, 2022
@hsubox76 hsubox76 deleted the ch-github-release branch May 23, 2022 20:53
@firebase firebase locked and limited conversation to collaborators Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
doc-changes PRs that affect docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants