-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
392 additions
and
449 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
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 was deleted.
Oops, something went wrong.
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,38 @@ | ||
mkdir -p $RUNNER_TEMP/dist | ||
cp -a * $RUNNER_TEMP/dist | ||
cp -a .github $RUNNER_TEMP/dist | ||
cp -a .vscode $RUNNER_TEMP/dist | ||
cp .* $RUNNER_TEMP/dist | ||
|
||
cd .yarn | ||
mkdir $RUNNER_TEMP/dist/.yarn | ||
cp -a patches $RUNNER_TEMP/dist/.yarn | ||
cp -a plugins $RUNNER_TEMP/dist/.yarn | ||
cp -a releases $RUNNER_TEMP/dist/.yarn | ||
cp -a sdks $RUNNER_TEMP/dist/.yarn | ||
cp -a versions $RUNNER_TEMP/dist/.yarn | ||
|
||
mv $RUNNER_TEMP/dist dist | ||
cd dist | ||
|
||
rm -rf node_modules | ||
|
||
# do not ignore lockfiles | ||
sed -i .gitignore \ | ||
-e '/yarn.lock/d' | ||
|
||
# if $GITHUB_REF is in the form of refs/tags/v* then it's a release | ||
if [[ $GITHUB_REF == refs/tags/v* ]]; then | ||
cat package.json | jq ".private=false" > package.json.tmp | ||
mv -f package.json.tmp package.json | ||
cd .. | ||
tar -czf dist.tgz dist | ||
npm publish dist.tgz --access public | ||
else | ||
VERSION=$(cat package.json | grep '"version":' | cut -d '"' -f 4) | ||
cat package.json | jq ".version=\"$VERSION-$GITHUB_SHA\" | .private=false" > package.json.tmp | ||
mv -f package.json.tmp package.json | ||
cd .. | ||
tar -czf dist.tgz dist | ||
npm publish dist.tgz --access public --tag nightly | ||
fi |
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,36 @@ | ||
name: npm | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v* | ||
release: | ||
types: | ||
- created | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- name: Install dependencies | ||
run: yarn --no-immutable | ||
|
||
- name: Publish | ||
if: ${{ env.NODE_AUTH_TOKEN }} | ||
run: bash .github/workflows/npm.sh | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_REF: ${{ github.ref }} | ||
GITHUB_SHA: ${{ github.sha }} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.