Skip to content

Fix tweet workflow #6695

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 6 commits into from
Oct 18, 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
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