Skip to content

Commit

Permalink
made pkg version configurable and standardized across arch
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Mar 2, 2023
1 parent 88e02c5 commit cc2f1b5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@



## v2.2.0 - [March 1, 2023](https://github.com/lando/pkg-action/releases/tag/v2.2.0)

* Added input `pkg` to specify version of [@vercel/pkg](https://github.com/vercel/pkg)
* Fixed bug where installed `pkg` version was not consistent across `arch`

## v2.1.0 - [March 1, 2023](https://github.com/lando/pkg-action/releases/tag/v2.1.0)

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

## Outputs
Expand Down
10 changes: 7 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ inputs:
description: "The operating system to build for win|linux|macos"
required: false
default: ${{ runner.os }}
pkg:
description: "The version on @vercel/pkg to use"
required: false
default: "5.8.0"
test:
description: "Hidden flag for input testing"
default: false
Expand Down Expand Up @@ -91,10 +95,10 @@ runs:
node-version: 16
cache: npm

- name: Install pkg
- name: Install pkg ${{ inputs.pkg }}
shell: bash
run: |
npm install -g pkg@5.8.0
npm install -g pkg@${{ inputs.pkg }}
if pkg --version >/dev/null; then
echo "::notice title=pkg installed::Using version $(pkg --version)"
else
Expand Down Expand Up @@ -145,7 +149,7 @@ runs:
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
apt update && apt -y install yarn
yarn global add pkg@5.6.0 --prefix /usr/local
yarn global add pkg@${{ inputs.pkg }} --prefix /usr/local
pkg --version
run: |
pkg \
Expand Down

0 comments on commit cc2f1b5

Please sign in to comment.