Skip to content

Commit c1342b5

Browse files
authored
Merge e101f3d into 8c5d522
2 parents 8c5d522 + e101f3d commit c1342b5

File tree

4 files changed

+74
-63
lines changed

4 files changed

+74
-63
lines changed

.github/workflows/canary-deploy.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Canary Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
deploy:
10+
name: Canary Deploy
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout Repo
15+
uses: actions/checkout@master
16+
with:
17+
# Canary release script requires git history and tags.
18+
fetch-depth: 0
19+
- name: Set up Node (10)
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: 10.x
23+
- name: Yarn install
24+
run: yarn
25+
- name: Deploy canary
26+
run: yarn release --canary
27+
env:
28+
NPM_TOKEN_ANALYTICS: ${{secrets.NPM_TOKEN_ANALYTICS}}
29+
NPM_TOKEN_ANALYTICS_INTEROP_TYPES: ${{secrets.NPM_TOKEN_ANALYTICS_INTEROP_TYPES}}
30+
NPM_TOKEN_ANALYTICS_TYPES: ${{secrets.NPM_TOKEN_ANALYTICS_TYPES}}
31+
NPM_TOKEN_APP: ${{secrets.NPM_TOKEN_APP}}
32+
NPM_TOKEN_APP_TYPES: ${{secrets.NPM_TOKEN_APP_TYPES}}
33+
NPM_TOKEN_AUTH: ${{secrets.NPM_TOKEN_AUTH}}
34+
NPM_TOKEN_AUTH_INTEROP_TYPES: ${{secrets.NPM_TOKEN_AUTH_INTEROP_TYPES}}
35+
NPM_TOKEN_AUTH_TYPES: ${{secrets.NPM_TOKEN_AUTH_TYPES}}
36+
NPM_TOKEN_COMPONENT: ${{secrets.NPM_TOKEN_COMPONENT}}
37+
NPM_TOKEN_DATABASE: ${{secrets.NPM_TOKEN_DATABASE}}
38+
NPM_TOKEN_DATABASE_TYPES: ${{secrets.NPM_TOKEN_DATABASE_TYPES}}
39+
NPM_TOKEN_FIRESTORE: ${{secrets.NPM_TOKEN_FIRESTORE}}
40+
NPM_TOKEN_FIRESTORE_TYPES: ${{secrets.NPM_TOKEN_FIRESTORE_TYPES}}
41+
NPM_TOKEN_FUNCTIONS: ${{secrets.NPM_TOKEN_FUNCTIONS}}
42+
NPM_TOKEN_FUNCTIONS_TYPES: ${{secrets.NPM_TOKEN_FUNCTIONS_TYPES}}
43+
NPM_TOKEN_INSTALLATIONS: ${{secrets.NPM_TOKEN_INSTALLATIONS}}
44+
NPM_TOKEN_INSTALLATIONS_TYPES: ${{secrets.NPM_TOKEN_INSTALLATIONS_TYPES}}
45+
NPM_TOKEN_LOGGER: ${{secrets.NPM_TOKEN_LOGGER}}
46+
NPM_TOKEN_MESSAGING: ${{secrets.NPM_TOKEN_MESSAGING}}
47+
NPM_TOKEN_MESSAGING_TYPES: ${{secrets.NPM_TOKEN_MESSAGING_TYPES}}
48+
NPM_TOKEN_PERFORMANCE: ${{secrets.NPM_TOKEN_PERFORMANCE}}
49+
NPM_TOKEN_PERFORMANCE_TYPES: ${{secrets.NPM_TOKEN_PERFORMANCE_TYPES}}
50+
NPM_TOKEN_POLYFILL: ${{secrets.NPM_TOKEN_POLYFILL}}
51+
NPM_TOKEN_REMOTE_CONFIG: ${{secrets.NPM_TOKEN_REMOTE_CONFIG}}
52+
NPM_TOKEN_REMOTE_CONFIG_TYPES: ${{secrets.NPM_TOKEN_REMOTE_CONFIG_TYPES}}
53+
NPM_TOKEN_RULES_UNIT_TESTING: ${{secrets.NPM_TOKEN_RULES_UNIT_TESTING}}
54+
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
55+
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
56+
NPM_TOKEN_TESTING: ${{secrets.NPM_TOKEN_TESTING}}
57+
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
58+
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
59+
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
60+
NPM_TOKEN_RXFIRE: ${{secrets.NPM_TOKEN_RXFIRE}}
61+
CI: true

.github/workflows/check-changeset.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
uses: actions/checkout@master
1313
with:
1414
# This makes Actions fetch all Git history so check_changeset script can diff properly.
15+
fetch-depth: 0
1516
- name: Set up Node (10)
1617
uses: actions/setup-node@v1
1718
with:

.github/workflows/test-all.yml

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -33,56 +33,3 @@ jobs:
3333
github-token: ${{ secrets.GITHUB_TOKEN }}
3434
path-to-lcov: ./lcov-all.info
3535
continue-on-error: true
36-
deploy:
37-
name: Canary Deploy
38-
runs-on: ubuntu-latest
39-
if: github.ref == 'refs/heads/master'
40-
needs: test
41-
42-
steps:
43-
- uses: actions/checkout@v2
44-
- name: Checkout
45-
# Canary release script requires git history and tags.
46-
run: git fetch --prune --unshallow
47-
- name: Set up Node (10)
48-
uses: actions/setup-node@v1
49-
with:
50-
node-version: 10.x
51-
- name: Yarn install
52-
run: yarn
53-
- name: Deploy canary
54-
run: yarn release --canary
55-
env:
56-
NPM_TOKEN_ANALYTICS: ${{secrets.NPM_TOKEN_ANALYTICS}}
57-
NPM_TOKEN_ANALYTICS_INTEROP_TYPES: ${{secrets.NPM_TOKEN_ANALYTICS_INTEROP_TYPES}}
58-
NPM_TOKEN_ANALYTICS_TYPES: ${{secrets.NPM_TOKEN_ANALYTICS_TYPES}}
59-
NPM_TOKEN_APP: ${{secrets.NPM_TOKEN_APP}}
60-
NPM_TOKEN_APP_TYPES: ${{secrets.NPM_TOKEN_APP_TYPES}}
61-
NPM_TOKEN_AUTH: ${{secrets.NPM_TOKEN_AUTH}}
62-
NPM_TOKEN_AUTH_INTEROP_TYPES: ${{secrets.NPM_TOKEN_AUTH_INTEROP_TYPES}}
63-
NPM_TOKEN_AUTH_TYPES: ${{secrets.NPM_TOKEN_AUTH_TYPES}}
64-
NPM_TOKEN_COMPONENT: ${{secrets.NPM_TOKEN_COMPONENT}}
65-
NPM_TOKEN_DATABASE: ${{secrets.NPM_TOKEN_DATABASE}}
66-
NPM_TOKEN_DATABASE_TYPES: ${{secrets.NPM_TOKEN_DATABASE_TYPES}}
67-
NPM_TOKEN_FIRESTORE: ${{secrets.NPM_TOKEN_FIRESTORE}}
68-
NPM_TOKEN_FIRESTORE_TYPES: ${{secrets.NPM_TOKEN_FIRESTORE_TYPES}}
69-
NPM_TOKEN_FUNCTIONS: ${{secrets.NPM_TOKEN_FUNCTIONS}}
70-
NPM_TOKEN_FUNCTIONS_TYPES: ${{secrets.NPM_TOKEN_FUNCTIONS_TYPES}}
71-
NPM_TOKEN_INSTALLATIONS: ${{secrets.NPM_TOKEN_INSTALLATIONS}}
72-
NPM_TOKEN_INSTALLATIONS_TYPES: ${{secrets.NPM_TOKEN_INSTALLATIONS_TYPES}}
73-
NPM_TOKEN_LOGGER: ${{secrets.NPM_TOKEN_LOGGER}}
74-
NPM_TOKEN_MESSAGING: ${{secrets.NPM_TOKEN_MESSAGING}}
75-
NPM_TOKEN_MESSAGING_TYPES: ${{secrets.NPM_TOKEN_MESSAGING_TYPES}}
76-
NPM_TOKEN_PERFORMANCE: ${{secrets.NPM_TOKEN_PERFORMANCE}}
77-
NPM_TOKEN_PERFORMANCE_TYPES: ${{secrets.NPM_TOKEN_PERFORMANCE_TYPES}}
78-
NPM_TOKEN_POLYFILL: ${{secrets.NPM_TOKEN_POLYFILL}}
79-
NPM_TOKEN_REMOTE_CONFIG: ${{secrets.NPM_TOKEN_REMOTE_CONFIG}}
80-
NPM_TOKEN_REMOTE_CONFIG_TYPES: ${{secrets.NPM_TOKEN_REMOTE_CONFIG_TYPES}}
81-
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
82-
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
83-
NPM_TOKEN_TESTING: ${{secrets.NPM_TOKEN_TESTING}}
84-
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
85-
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
86-
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
87-
NPM_TOKEN_RXFIRE: ${{secrets.NPM_TOKEN_RXFIRE}}
88-
CI: true

scripts/release/canary.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,6 @@ async function publishPackage(pkg: string) {
9090
try {
9191
const path = await mapPkgNameToPkgPath(pkg);
9292

93-
const { private: isPrivate } = JSON.parse(
94-
await readFile(`${path}/package.json`, 'utf8')
95-
);
96-
97-
/**
98-
* Skip private packages
99-
*/
100-
if (isPrivate) return;
101-
10293
/**
10394
* publish args
10495
*/
@@ -134,9 +125,20 @@ async function publishToNpm(updatedPkgs: string[]) {
134125
* Can't require here because we have a cached version of the required JSON
135126
* in memory and it doesn't contain the updates
136127
*/
137-
const { version } = JSON.parse(
128+
const { version, private: isPrivate } = JSON.parse(
138129
await readFile(`${path}/package.json`, 'utf8')
139130
);
131+
132+
/**
133+
* Skip private packages
134+
*/
135+
if (isPrivate) {
136+
return {
137+
title: `Skipping private package: ${pkg}.`,
138+
task: () => {}
139+
};
140+
}
141+
140142
return {
141143
title: `📦 ${pkg}@${version}`,
142144
task: () => publishPackage(pkg)

0 commit comments

Comments
 (0)