Skip to content

Commit 46596de

Browse files
authored
Fix tweet workflow (#6695)
1 parent 4679a95 commit 46596de

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/release-tweet.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,19 @@ jobs:
1818
name: Send Release Tweet
1919
runs-on: ubuntu-latest
2020
steps:
21+
- name: Checkout Repo
22+
uses: actions/checkout@master
23+
- name: Setup Node.js 14.x
24+
uses: actions/setup-node@master
25+
with:
26+
node-version: 14.x
2127
- name: Poll release notes page on devsite
2228
run: node scripts/ci/poll_release_notes.js
2329
env:
2430
VERSION: ${{ github.event.inputs.version }}
2531
FORCE_PUBLISH: ${{ github.event.inputs.force }}
2632
- name: Post to Twitter
27-
uses: firebase/firebase-admin-node/.github/actions/send-tweet
33+
uses: firebase/firebase-admin-node/.github/actions/send-tweet@master
2834
with:
2935
status: >
3036
v${{github.event.inputs.version}} of @Firebase JavaScript client for Web / Node.js is available.

scripts/ci/poll_release_notes.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ async function pollReleaseNotes() {
5252
for (let i = 0; i < MAX_ATTEMPTS; i++) {
5353
siteContent = await getData();
5454
const matches = siteContent.match(/<a name="\d+\.\d+.\d+">/g);
55-
if (matches[0] === version) {
55+
if (matches[0] === `<a name="${version}">`) {
56+
console.log(`Found ${version} in release notes.`);
5657
return;
5758
}
5859
if (matches.includes(`<a name="${version}">`) && !process.env.FORCE) {

0 commit comments

Comments
 (0)