Skip to content

Commit

Permalink
Update publish
Browse files Browse the repository at this point in the history
  • Loading branch information
motdotla committed Nov 18, 2023
1 parent e4b138e commit dabc028
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/bins.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
name: bins

on: push
on:
push:
tags:
- v*.*.*

jobs:
bins:
publish:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2

- name: node
uses: actions/setup-node@v1
with:
node-version: 16.x

# https://news.ycombinator.com/item?id=32388964
# https://github.com/procursusteam/ldid
# https://www.pulumi.com/blog/nodejs-binaries-with-pkg/
Expand All @@ -18,25 +26,22 @@ jobs:
with:
tag: v2.1.5-procursus2

- name: ldid
run: ldid

- name: node
uses: actions/setup-node@v2
with:
node-version: '18'

- name: npm install
run: npm install

- name: pkg
run: npm run pkg
run: |
echo "pkg-ing"
./node_modules/.bin/pkg . --no-bytecode --public-packages "*" --public --target node16-macos-arm64 --output bin/darwin-arm64/git-dotenv
echo "dist-ing"
mkdir -p dist
tar --gzip -cf ./dist/git-dotenv-darwin-arm64.tar.gz README.md LICENSE -C bin/darwin-arm64/ .
- name: permission
run: chmod +x bin/git-dotenv

- name: create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: bin/git-dotenv
files: |
dist/*.tar.gz
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,13 @@
"git-dotenv": "./git-dotenv.js"
},
"scripts": {
"standard": "standard",
"pkg": "pkg . --debug"
"standard": "standard"
},
"dependencies": {
"commander": "^11.1.0"
},
"devDependencies": {
"pkg": "^5.8.1",
"standard": "^17.1.0"
},
"pkg": {
"targets": ["node18-macos-arm64"],
"outputPath": "bin"
}
}

0 comments on commit dabc028

Please sign in to comment.