forked from video-dev/hls.js
-
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.
npm/github release with github action and remove travis
- Loading branch information
1 parent
077ea60
commit 544b4ba
Showing
5 changed files
with
112 additions
and
111 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,6 @@ coverage/ | |
|
||
# Build | ||
/dist | ||
/dist.zip | ||
/netlify | ||
/api-docs |
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,28 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if [[ $(node ./scripts/check-already-published.js) = "not published" ]]; then | ||
# write the token to config | ||
# see https://docs.npmjs.com/private-modules/ci-server-config | ||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc | ||
if [[ -z "$TAG" ]]; then | ||
npm publish --tag alpha | ||
echo "Published alpha." | ||
curl https://purge.jsdelivr.net/npm/hls.js@alpha | ||
curl https://purge.jsdelivr.net/npm/hls.js@alpha/dist/hls-demo.js | ||
echo "Cleared jsdelivr cache." | ||
else | ||
tag=$(node ./scripts/get-version-tag.js) | ||
if [ "${tag}" = "alpha" ]; then | ||
# alpha (previously canary) is blocked because this is handled separately on every commit | ||
echo "alpha (previously canary) not supported as explicit tag" | ||
exit 1 | ||
fi | ||
echo "Publishing tag: ${tag}" | ||
npm publish --tag "${tag}" | ||
curl "https://purge.jsdelivr.net/npm/hls.js@${tag}" | ||
echo "Published." | ||
fi | ||
else | ||
echo "Already published." | ||
fi |
This file was deleted.
Oops, something went wrong.