Skip to content

Commit

Permalink
fix: package should be a tar.gz for npm to use
Browse files Browse the repository at this point in the history
  • Loading branch information
yeojz committed Aug 28, 2019
1 parent cd0db1f commit 4a0c546
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,5 @@ jobs:
- uses: actions/upload-artifact@master
if: github.ref == 'refs/heads/master'
with:
name: otplib-ci-master
path: builds/otplib
name: otplib-ci-package
path: builds/artifacts
5 changes: 5 additions & 0 deletions scripts/build-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ if [ ! -d "builds/otplib" ]; then
npm run build
fi

npx rimraf builds/artifacts
mkdir -p builds/artifacts

postfix=$(git rev-parse --short HEAD)
pkg_version="0.0.0-ci.${postfix}"

echo "--- updating package.json to $pkg_version ---"
npx json -I -f builds/otplib/package.json -e "this.version=\"$pkg_version\""

tar -C "builds/otplib" -czvf "builds/artifacts/otplib-ci-${postfix}.tar.gz" .

0 comments on commit 4a0c546

Please sign in to comment.