forked from airbnb/hypernova
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Use release-drafter to draft releases on pushes to main similar to marketplace - On release publish, update the version in package.json and publish to github packages - Don't run tests on main (redundant) - Update .npmrc to use rvshare's github packages registry - Sneak in a `Promise.isRejected` polyfill allowlist item - Update URLS in package.json and remove `prepare`
- Loading branch information
Showing
7 changed files
with
87 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name-template: "v$NEXT_PATCH_VERSION 🎉" | ||
tag-template: "v$NEXT_PATCH_VERSION" | ||
change-template: "* $TITLE (#$NUMBER) @$AUTHOR" | ||
template: | | ||
## Changes | ||
$CHANGES | ||
## Contributors | ||
$CONTRIBUTORS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Draft Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
update-draft-release: | ||
if: !startsWith(github.event.head_commit.message, '[no-release-draft]') | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: release-drafter/release-drafter@v6 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Publish Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish-release: | ||
name: Publish release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build the project | ||
run: npm run build | ||
|
||
- name: Configure git | ||
run: | | ||
git config --global user.name "${GITHUB_ACTOR}" | ||
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com" | ||
- name: Update package.json version | ||
run: | | ||
# get version from tag and update package.json | ||
VERSION=${GITHUB_REF#refs/tags/} | ||
echo "Setting version in package.json to ${VERSION}" | ||
npm version ${VERSION} --no-git-tag-version | ||
# push to main | ||
git add package.json | ||
git commit -m "[no-release-draft] Update package.json to version ${VERSION}" | ||
git push origin main | ||
# move tag to HEAD | ||
git push --force origin "HEAD:refs/tags/${VERSION}" | ||
git fetch --tags | ||
- name: Publish to Github Packages | ||
run: npm publish | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
package-lock=false | ||
audit-level=critical | ||
|
||
@rvshare:registry=https://npm.pkg.github.com | ||
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters