From e24dbfd9fb023c820d7bf4a00f55090d5ee61e5b Mon Sep 17 00:00:00 2001 From: Xuejie Xiao Date: Wed, 10 Jan 2024 13:38:12 +0800 Subject: [PATCH] Create npm-publish.yml --- .github/workflows/npm-publish.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..0d5487a --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,23 @@ +name: Node.js Package + +on: + push: + tags: + - "*.*.*" + +jobs: + linux-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - run: npm install + - run: npm run build + - run: npx pkg --options "no-warnings" -t node18-linux-x64 cli-dist.js -o ckb-transaction-dumper + - run: tar czf ckb-transaction-dumper_${{ github.ref_name }}_linux_x86_64.tar.gz ckb-transaction-dumper README.md LICENSE + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: ckb-transaction-dumper_${{ github.ref_name }}_linux_x86_64.tar.gz