Skip to content

Commit

Permalink
It's a journey (#5242)
Browse files Browse the repository at this point in the history
  • Loading branch information
acywatson authored Nov 17, 2023
1 parent 83b8317 commit 1eb6b4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ jobs:
git config user.name "Lexical GitHub Actions Bot"
git config user.email "<>"
- run: npm install
- run: npm run increment-version -- --i $INCREMENT
- id: latest-release
uses: pozetroninc/github-action-get-latest-release@master
with:
owner: facebook
repo: lexical
excludes: draft
- run: LATEST_RELEASE=${{ latest-release.outputs.release }} npm run increment-version -- --i $INCREMENT
env:
INCREMENT: ${{ inputs.increment }}
- run: git push -u [email protected]:facebook/lexical.git --follow-tags
6 changes: 1 addition & 5 deletions scripts/npm/update-changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@ const isPrerelease = process.env.npm_package_version.indexOf('-') !== -1;
async function updateChangelog() {
const date = (await exec(`git show --format=%as | head -1`)).stdout.trim();
const header = `## v${process.env.npm_package_version} (${date})`;
const previousReleaseHash = (
await exec(`git log -n 1 origin/latest --pretty=format:"%H"`)
).stdout.trim();
const changelogContent = (
await exec(
`git --no-pager log --oneline ${previousReleaseHash}...HEAD~1 --pretty=format:\"- %s %an\"`,
`git --no-pager log --oneline ${process.env.LATEST_RELEASE}...HEAD~1 --pretty=format:\"- %s %an\"`,
)
).stdout
.replace(/[^a-zA-Z0-9()\n \-,\.#]/g, '')
Expand All @@ -33,7 +30,6 @@ async function updateChangelog() {
await exec(
`cat ./CHANGELOG.md >> ${tmpFilePath} && mv ${tmpFilePath} ./CHANGELOG.md`,
);
await exec(`git commit --amend --no-edit`);
}

if (!isPrerelease) {
Expand Down

2 comments on commit 1eb6b4c

@vercel
Copy link

@vercel vercel bot commented on 1eb6b4c Nov 17, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

lexical – ./packages/lexical-website

lexical-fbopensource.vercel.app
lexicaljs.com
lexical.dev
lexical-git-main-fbopensource.vercel.app
lexicaljs.org
www.lexical.dev

@vercel
Copy link

@vercel vercel bot commented on 1eb6b4c Nov 17, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

lexical-playground – ./packages/lexical-playground

lexical-playground-git-main-fbopensource.vercel.app
lexical-playground.vercel.app
playground.lexical.dev
lexical-playground-fbopensource.vercel.app

Please sign in to comment.