Skip to content

Commit

Permalink
v3; defaults to pkgx^2; pure js rewrite (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jan 15, 2025
1 parent 6b6c1c2 commit e0a8970
Show file tree
Hide file tree
Showing 19 changed files with 702 additions and 428 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/cd.vx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: cd·vx

on:
release:
types:
- published

concurrency:
group: cd/vx/${{ github.event.release.tag_name }}
cancel-in-progress: true

permissions:
contents: write

jobs:
retag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: fischerscode/tagger@v0
with:
prefix: v
- run: |
git tag -f latest
git push origin latest --force
77 changes: 0 additions & 77 deletions .github/workflows/cd.yml

This file was deleted.

42 changes: 14 additions & 28 deletions .github/workflows/ci.action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,27 @@ on:
workflow_call:
pull_request:
paths:
- action.ts
- action.js
- action.yml
- package.json
- installer.sh

concurrency:
group: ${{ github.ref || 'ci' }}/action.ts
cancel-in-progress: true

jobs:
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: ./scripts/dist.sh
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist

std:
needs: dist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: dist
path: dist
- run: npm i
- uses: ./
with:
version: null
- run: pkgx --version

plus-pkgs:
needs: dist
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -46,7 +34,7 @@ jobs:
- [self-hosted, linux, ARM64] # works in arm64 environments
prefix:
- null
- /opt
- /tmp/pkgx
container:
- null
include:
Expand All @@ -55,31 +43,29 @@ jobs:
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3

- uses: actions/setup-node@v4
with:
name: dist
path: dist
node-version: latest
- run: npm i

- uses: ./
with:
PKGX_DIR: ${{ matrix.prefix }}
+: node@18 deno.land

- run: test -f '${{ matrix.prefix }}/pkgx.sh/v*/bin/pkgx'
- run: test -f '${{ matrix.prefix }}/deno.land/v*/bin/deno'
if: ${{ matrix.prefix }}

- run: pkgx --version
- run: node --eval 'console.log(1)'
- run: if [[ "$(node --version)" != v18.* ]]; then exit 1; fi
- run: deno --version

multiple-apply-is-ok:
runs-on: ubuntu-latest
needs: dist
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: dist
path: dist
- run: npm i
- uses: ./
- run: pkgx --version
- uses: ./
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,5 +196,7 @@ jobs:
tar xz --strip-components=3
- run: mv pkgx /usr/local/bin
- run: test "$(pkgx --version)" = 'pkgx 1.0.0'
- run: PKGX_UPDATE=no ./installer.sh
- run: test "$(pkgx --version)" = 'pkgx 1.0.0'
- run: ./installer.sh
- run: pkgx semverator gt $(pkgx --version | awk '{print $2}') 1.0.0
9 changes: 9 additions & 0 deletions action.js

Large diffs are not rendered by default.

99 changes: 0 additions & 99 deletions action.ts

This file was deleted.

6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ inputs:
version:
description: >
The version of `pkgx` to install.
Defaults to ^1.
Defaults to ^2
required: false
default: ^1
default: ^2
runs:
using: node20
main: dist/out/index.js
main: ./action.js
Binary file removed dist/build/2.4.2/koffi_darwin_arm64/koffi.node
Binary file not shown.
Binary file removed dist/build/2.4.2/koffi_darwin_x64/koffi.node
Binary file not shown.
Binary file removed dist/build/2.4.2/koffi_linux_arm64/koffi.node
Binary file not shown.
Binary file removed dist/build/2.4.2/koffi_linux_x64/koffi.node
Binary file not shown.
3 changes: 0 additions & 3 deletions dist/out/index.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/out/installer.sh

This file was deleted.

Loading

0 comments on commit e0a8970

Please sign in to comment.