Skip to content

Commit

Permalink
Fix tweet workflow (#6695)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubox76 authored Oct 18, 2022
1 parent 4679a95 commit 46596de
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/release-tweet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@ jobs:
name: Send Release Tweet
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Setup Node.js 14.x
uses: actions/setup-node@master
with:
node-version: 14.x
- name: Poll release notes page on devsite
run: node scripts/ci/poll_release_notes.js
env:
VERSION: ${{ github.event.inputs.version }}
FORCE_PUBLISH: ${{ github.event.inputs.force }}
- name: Post to Twitter
uses: firebase/firebase-admin-node/.github/actions/send-tweet
uses: firebase/firebase-admin-node/.github/actions/send-tweet@master
with:
status: >
v${{github.event.inputs.version}} of @Firebase JavaScript client for Web / Node.js is available.
Expand Down
3 changes: 2 additions & 1 deletion scripts/ci/poll_release_notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ async function pollReleaseNotes() {
for (let i = 0; i < MAX_ATTEMPTS; i++) {
siteContent = await getData();
const matches = siteContent.match(/<a name="\d+\.\d+.\d+">/g);
if (matches[0] === version) {
if (matches[0] === `<a name="${version}">`) {
console.log(`Found ${version} in release notes.`);
return;
}
if (matches.includes(`<a name="${version}">`) && !process.env.FORCE) {
Expand Down

0 comments on commit 46596de

Please sign in to comment.