Skip to content

Commit

Permalink
npmignore whitelist, i386 bin, tar package step (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
fxck authored Oct 7, 2020
1 parent 12c165f commit 71fb662
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@ jobs:
matrix:
include:
- os: ubuntu-latest
buildCmd: env GOOS=linux GOARCH=amd64 go build -o zcli-linux-amd64 ./main.go && tar -czvf zcli-linux-amd64.tar.gz zcli-linux-amd64
buildCmd: env GOOS=linux GOARCH=amd64 go build -o zcli-linux-amd64 ./main.go
file: zcli-linux-amd64
args:
strip: true
- os: ubuntu-latest
buildCmd: env GOOS=linux GOARCH=386 go build -o zcli-linux-i386 ./main.go
file: zcli-linux-i386
args:
strip: true
- os: macos-latest
buildCmd: env GOOS=darwin GOARCH=amd64 go build -o zcli-darwin-amd64 ./main.go && tar -czvf zcli-darwin-amd64.tar.gz zcli-darwin-amd64
buildCmd: env GOOS=darwin GOARCH=amd64 go build -o zcli-darwin-amd64 ./main.go
file: zcli-darwin-amd64
args:
strip: false
Expand All @@ -42,14 +47,17 @@ jobs:
args: ${{ matrix.args }}
strip: ${{ matrix.strip }}

- name: Package binaries
run: tar -czvf ${{ matrix.file }}.tar.gz ${{ matrix.file }}

- name: Upload asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ matrix.file }}
asset_name: ${{ matrix.file }}
asset_path: ./${{ matrix.file }}.tar.gz
asset_name: ${{ matrix.file }}.tar.gz
asset_content_type: application/octet-stream

publish-npm:
Expand Down
7 changes: 0 additions & 7 deletions .npmignore

This file was deleted.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
"bin": {
"zcli": "./tools/npm/run.js"
},
"files": [
"/tools/npm",
"/package.json",
"/README.md"
],
"scripts": {
"postinstall": "./tools/npm/install.js",
"preuninstall": "./tools/npm/uninstall.js"
Expand Down

0 comments on commit 71fb662

Please sign in to comment.