Skip to content

Commit cc2f1b5

Browse files
committed
made pkg version configurable and standardized across arch
1 parent 88e02c5 commit cc2f1b5

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11

22

3+
4+
## v2.2.0 - [March 1, 2023](https://github.com/lando/pkg-action/releases/tag/v2.2.0)
5+
6+
* Added input `pkg` to specify version of [@vercel/pkg](https://github.com/vercel/pkg)
7+
* Fixed bug where installed `pkg` version was not consistent across `arch`
8+
39
## v2.1.0 - [March 1, 2023](https://github.com/lando/pkg-action/releases/tag/v2.1.0)
410

511
* Bumped to `node@16`

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ These keys are set to sane defaults but can be modified as needed.
3434
| `node-version` | The node version to package with. | `node14` | `node8` \| `node10` \| `node12` \| `node14` \| `node16` \| `latest` |
3535
| `options` | Additional options and flags to pass into pkg. | `null` | Additional [pkg options](https://github.com/vercel/pkg#usage) |
3636
| `os` | The operating system to build for. | `${{ runner.os }}` | `linux` \| `macos` \| `win` |
37+
| `pkg` | The version on @vercel/pkg to use. | `5.8.0` | `latest` |
3738
| `upload` | Upload the artifacts. Useful if you need to grab them for downstream for things like code signing. | `true` | `false` \| `true` |
3839

3940
## Outputs

action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ inputs:
2929
description: "The operating system to build for win|linux|macos"
3030
required: false
3131
default: ${{ runner.os }}
32+
pkg:
33+
description: "The version on @vercel/pkg to use"
34+
required: false
35+
default: "5.8.0"
3236
test:
3337
description: "Hidden flag for input testing"
3438
default: false
@@ -91,10 +95,10 @@ runs:
9195
node-version: 16
9296
cache: npm
9397

94-
- name: Install pkg
98+
- name: Install pkg ${{ inputs.pkg }}
9599
shell: bash
96100
run: |
97-
npm install -g pkg@5.8.0
101+
npm install -g pkg@${{ inputs.pkg }}
98102
if pkg --version >/dev/null; then
99103
echo "::notice title=pkg installed::Using version $(pkg --version)"
100104
else
@@ -145,7 +149,7 @@ runs:
145149
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
146150
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
147151
apt update && apt -y install yarn
148-
yarn global add pkg@5.6.0 --prefix /usr/local
152+
yarn global add pkg@${{ inputs.pkg }} --prefix /usr/local
149153
pkg --version
150154
run: |
151155
pkg \

0 commit comments

Comments
 (0)