Skip to content

Commit eb1c861

Browse files
committed
v3; defaults to pkgx^2; pure js rewrite (#256)
1 parent 6b6c1c2 commit eb1c861

File tree

20 files changed

+877
-440
lines changed

20 files changed

+877
-440
lines changed

.github/workflows/cd.qa.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
on:
2+
workflow_dispatch:
3+
inputs:
4+
version:
5+
required: true
6+
7+
jobs:
8+
qa-installer:
9+
uses: ./.github/workflows/ci.installer.yml
10+
qa-action:
11+
uses: ./.github/workflows/ci.action.yml

.github/workflows/cd.vx.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: cd·vx
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
concurrency:
9+
group: cd/vx/${{ github.event.release.tag_name }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
retag:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: fischerscode/tagger@v0
21+
with:
22+
prefix: v
23+
- run: |
24+
git tag -f latest
25+
git push origin latest --force

.github/workflows/cd.yml

Lines changed: 0 additions & 77 deletions
This file was deleted.

.github/workflows/ci.action.yml

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,32 @@
11
on:
2+
push:
3+
branches:
4+
- main
25
workflow_call:
36
pull_request:
47
paths:
5-
- action.ts
8+
- action.js
69
- action.yml
710
- package.json
11+
- installer.sh
12+
- .github/workflows/ci.action.yml
813

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

1318
jobs:
14-
dist:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- uses: actions/checkout@v4
18-
- run: ./scripts/dist.sh
19-
- uses: actions/upload-artifact@v3
20-
with:
21-
name: dist
22-
path: dist
23-
2419
std:
25-
needs: dist
2620
runs-on: ubuntu-latest
2721
steps:
2822
- uses: actions/checkout@v4
29-
- uses: actions/download-artifact@v3
30-
with:
31-
name: dist
32-
path: dist
23+
- run: npm i
3324
- uses: ./
25+
with:
26+
version: null
3427
- run: pkgx --version
3528

3629
plus-pkgs:
37-
needs: dist
3830
runs-on: ${{ matrix.os }}
3931
strategy:
4032
fail-fast: false
@@ -46,7 +38,7 @@ jobs:
4638
- [self-hosted, linux, ARM64] # works in arm64 environments
4739
prefix:
4840
- null
49-
- /opt
41+
- /tmp/pkgx
5042
container:
5143
- null
5244
include:
@@ -55,32 +47,43 @@ jobs:
5547
container: ${{ matrix.container }}
5648
steps:
5749
- uses: actions/checkout@v4
58-
- uses: actions/download-artifact@v3
50+
51+
- uses: actions/setup-node@v4
5952
with:
60-
name: dist
61-
path: dist
53+
node-version: latest
54+
- run: npm i
6255

6356
- uses: ./
6457
with:
6558
PKGX_DIR: ${{ matrix.prefix }}
6659
+: node@18 deno.land
6760

68-
- run: test -f '${{ matrix.prefix }}/pkgx.sh/v*/bin/pkgx'
61+
- run: test -f '${{ matrix.prefix }}/deno.land/v*/bin/deno'
6962
if: ${{ matrix.prefix }}
63+
7064
- run: pkgx --version
71-
- run: node --eval 'console.log(1)'
65+
- run: if [[ "$(node --version)" != v18.* ]]; then exit 1; fi
7266
- run: deno --version
7367

7468
multiple-apply-is-ok:
7569
runs-on: ubuntu-latest
76-
needs: dist
7770
steps:
7871
- uses: actions/checkout@v4
79-
- uses: actions/download-artifact@v3
80-
with:
81-
name: dist
82-
path: dist
72+
- run: npm i
73+
- uses: ./
74+
- run: pkgx --version
8375
- uses: ./
8476
- run: pkgx --version
77+
78+
dist:
79+
runs-on: ubuntu-latest
80+
steps:
81+
- uses: actions/checkout@v4
82+
- run: npm i
83+
- uses: ./
84+
- run: npm run dist
85+
- run: rm /usr/local/bin/pkgx
86+
- run: '! pkgx --version'
87+
- run: git clean -xfd
8588
- uses: ./
8689
- run: pkgx --version

.github/workflows/ci.installer.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -156,22 +156,11 @@ jobs:
156156
- debian:buster-slim
157157
- debian:bullseye-slim
158158
- debian:bookworm-slim
159-
160159
- archlinux:latest
161-
162-
# - ubuntu:trusty glibc too old
163-
# - ubuntu:xenial glibc too old
164-
# - ubuntu:bionic glibc too old
165-
# - ubuntu:lunar out of support
166160
- ubuntu:focal
167161
- ubuntu:jammy
168-
- ubuntu:24.04
169-
- ubuntu:24.10
170-
162+
- ubuntu:noble
171163
- fedora:latest
172-
173-
# - nixos/nix:latest can’t exec
174-
# - alpine:latest pkgx binary doesn’t actually end up on the system (wtf)
175164
container: ${{ matrix.container }}
176165
steps:
177166
- uses: actions/checkout@v4
@@ -196,5 +185,7 @@ jobs:
196185
tar xz --strip-components=3
197186
- run: mv pkgx /usr/local/bin
198187
- run: test "$(pkgx --version)" = 'pkgx 1.0.0'
188+
- run: PKGX_UPDATE=no ./installer.sh
189+
- run: test "$(pkgx --version)" = 'pkgx 1.0.0'
199190
- run: ./installer.sh
200191
- run: pkgx semverator gt $(pkgx --version | awk '{print $2}') 1.0.0

0 commit comments

Comments
 (0)