diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f67bde1..b205780 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,6 +6,22 @@ on: - "*" jobs: + node-script-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: cp cli-dist.js ckb-transaction-dumper + - run: tar czf ckb-transaction-dumper_v${{ github.ref_name }}_node_executable_script.tar.gz ckb-transaction-dumper README.md LICENSE + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: ckb-transaction-dumper_v${{ github.ref_name }}_node_executable_script.tar.gz + linux-release: runs-on: ubuntu-latest steps: @@ -16,8 +32,40 @@ jobs: - 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 + - run: tar czf ckb-transaction-dumper_v${{ 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_v${{ github.ref_name }}_linux_x86_64.tar.gz + + macos-release: + runs-on: macos-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-macos-x64 cli-dist.js -o ckb-transaction-dumper + - run: tar czf ckb-transaction-dumper_v${{ github.ref_name }}_macos_x86_64.tar.gz ckb-transaction-dumper README.md LICENSE + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: ckb-transaction-dumper_v${{ github.ref_name }}_macos_x86_64.tar.gz + + macos-release: + runs-on: windows-2019 + 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-win-x64 cli-dist.js -o ckb-transaction-dumper + - run: tar czf ckb-transaction-dumper_v${{ github.ref_name }}_win_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 + files: ckb-transaction-dumper_v${{ github.ref_name }}_win_x86_64.tar.gz diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 49a2920..0000000 --- a/.travis.yml +++ /dev/null @@ -1,65 +0,0 @@ -language: node_js -node_js: - - "12" - -before_script: - - npm install - -script: - - npm install - -deploy: - - provider: releases - skip_cleanup: true - on: - tags: true - condition: $REL_PKG != "" - api_key: "$GITHUB_TOKEN" - file: - - "releases/${REL_PKG}" - -matrix: - include: - - name: Build on linux - os: linux - dist: bionic - script: - - npm run fmt - - npm run build - - git diff --exit-code - - name: Package for linux - if: 'tag IS present' - os: linux - dist: bionic - env: REL_PKG=ckb-transaction-dumper_${TRAVIS_TAG}_linux_x86_64.tar.gz - script: - - mkdir -p releases - - npx pkg -t node12.13.1-linux-x64 cli-dist.js -o ckb-transaction-dumper - - tar czf releases/$REL_PKG ckb-transaction-dumper README.md LICENSE - - name: Package for osx - if: 'tag IS present' - os: linux - dist: bionic - env: REL_PKG=ckb-transaction-dumper_${TRAVIS_TAG}_darwin_x86_64.tar.gz - script: - - mkdir -p releases - - npx pkg -t node12.13.1-osx-x64 cli-dist.js -o ckb-transaction-dumper - - tar czf releases/$REL_PKG ckb-transaction-dumper README.md LICENSE - - name: Package for windows - if: 'tag IS present' - os: linux - dist: bionic - env: REL_PKG=ckb-transaction-dumper_${TRAVIS_TAG}_windows_x86_64.tar.gz - script: - - mkdir -p releases - - npx pkg -t node12.13.1-win-x64 cli-dist.js -o ckb-transaction-dumper.exe - - tar czf releases/$REL_PKG ckb-transaction-dumper.exe README.md LICENSE - - name: Package node script - if: 'tag IS present' - os: linux - dist: bionic - env: REL_PKG=ckb-transaction-dumper_${TRAVIS_TAG}_node_executable_script.tar.gz - script: - - mkdir -p releases - - cp cli-dist.js ckb-transaction-dumper - - tar czf releases/$REL_PKG ckb-transaction-dumper README.md LICENSE diff --git a/package-lock.json b/package-lock.json index 19f9bb1..ad40f77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ckb-transaction-dumper", - "version": "0.3.1", + "version": "0.3.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ckb-transaction-dumper", - "version": "0.3.1", + "version": "0.3.2", "license": "MIT", "bin": { "ckb-transaction-dumper": "cli-dist.js" diff --git a/package.json b/package.json index 9ac1f08..c6e11e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ckb-transaction-dumper", - "version": "0.3.1", + "version": "0.3.2", "description": "CKB Transaction Dumper, used together with ckb-standalone-debugger", "bin": { "ckb-transaction-dumper": "./cli-dist.js"