mirror of
https://github.com/arx-research/libhalo.git
synced 2026-01-10 05:38:10 -05:00
Migrate project foundations to TypeScript (#342)
This commit is contained in:
committed by
GitHub
parent
ce798f60f9
commit
daa5bd2417
40
.github/workflows/check_cli.yml
vendored
40
.github/workflows/check_cli.yml
vendored
@@ -1,40 +0,0 @@
|
||||
name: Check halocli tool
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'cli/README.md'
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'cli/README.md'
|
||||
- 'docs/**'
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
check_cli_tool:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Install native dependencies (Linux)
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install -y libpcsclite-dev
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Node.JS
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
- name: Install dependencies (root)
|
||||
run: |
|
||||
yarn install --frozen-lockfile --production=false
|
||||
- name: Install dependencies (cli)
|
||||
run: |
|
||||
cd cli
|
||||
yarn install --frozen-lockfile --production=false
|
||||
- name: Package HaLo CLI tool (Linux)
|
||||
run: |
|
||||
cd cli
|
||||
node_modules/.bin/pkg -t node18-linux-x64 package.json
|
||||
33
.github/workflows/check_lib.yml
vendored
33
.github/workflows/check_lib.yml
vendored
@@ -1,33 +0,0 @@
|
||||
name: Check libhalo.js
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'cli/README.md'
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'cli/README.md'
|
||||
- 'docs/**'
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
check_js_lib:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Node.JS
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
- name: Install dependencies (root)
|
||||
run: |
|
||||
yarn install --frozen-lockfile --production=false
|
||||
- name: Run webpack
|
||||
run: |
|
||||
cd web
|
||||
webpack
|
||||
8
.github/workflows/prod_build_cli.yml
vendored
8
.github/workflows/prod_build_cli.yml
vendored
@@ -77,7 +77,9 @@ jobs:
|
||||
- name: Install dependencies (root)
|
||||
shell: bash
|
||||
run: |
|
||||
cd core
|
||||
yarn install --frozen-lockfile --production=false
|
||||
./node_modules/.bin/tsc
|
||||
- name: Install dependencies (cli)
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -86,13 +88,13 @@ jobs:
|
||||
- name: Build libhalo with webpack
|
||||
shell: bash
|
||||
run: |
|
||||
cd web
|
||||
../node_modules/.bin/webpack
|
||||
cd core
|
||||
./node_modules/.bin/webpack
|
||||
- name: Build halo-tools with webpack
|
||||
shell: bash
|
||||
run: |
|
||||
cd cli
|
||||
../node_modules/.bin/webpack
|
||||
./node_modules/.bin/webpack
|
||||
mv dist_webpack/* .
|
||||
mkdir build
|
||||
cp node_modules/@pokusew/pcsclite/build/Release/pcsclite.node build/pcsclite.node
|
||||
|
||||
18
.github/workflows/prod_build_lib.yml
vendored
18
.github/workflows/prod_build_lib.yml
vendored
@@ -56,10 +56,11 @@ jobs:
|
||||
node-version: 20
|
||||
- name: Install dependencies (root)
|
||||
run: |
|
||||
cd core
|
||||
yarn install --frozen-lockfile --production=false
|
||||
- name: Run webpack
|
||||
run: |
|
||||
cd web
|
||||
cd core
|
||||
webpack
|
||||
- name: Download release upload URL
|
||||
uses: actions/download-artifact@v4
|
||||
@@ -73,7 +74,7 @@ jobs:
|
||||
uses: sigstore/cosign-installer@v3.5.0
|
||||
- name: Sign libhalo.js with cosign
|
||||
run: |
|
||||
cd ./web/dist
|
||||
cd ./core/dist
|
||||
echo y | cosign sign-blob ./libhalo.js --output-certificate ./libhalo.js-keyless.pem --output-signature ./libhalo.js-keyless.sig
|
||||
cosign verify-blob --cert ./libhalo.js-keyless.pem --signature ./libhalo.js-keyless.sig --certificate-identity "https://github.com/arx-research/libhalo/.github/workflows/prod_build_lib.yml@${GITHUB_REF}" --certificate-oidc-issuer https://token.actions.githubusercontent.com ./libhalo.js
|
||||
- name: Upload release asset (JS bundle)
|
||||
@@ -83,7 +84,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.out_store.outputs.release_upload_url }}
|
||||
asset_path: ./web/dist/libhalo.js
|
||||
asset_path: ./core/dist/libhalo.js
|
||||
asset_name: libhalo.js
|
||||
asset_content_type: text/javascript
|
||||
- name: Upload release asset (LICENSE file)
|
||||
@@ -93,7 +94,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.out_store.outputs.release_upload_url }}
|
||||
asset_path: ./web/dist/libhalo.js.LICENSE.txt
|
||||
asset_path: ./core/dist/libhalo.js.LICENSE.txt
|
||||
asset_name: libhalo.js.LICENSE.txt
|
||||
asset_content_type: text/plain
|
||||
- name: Upload release asset (cosign pem)
|
||||
@@ -103,7 +104,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.out_store.outputs.release_upload_url }}
|
||||
asset_path: ./web/dist/libhalo.js-keyless.pem
|
||||
asset_path: ./core/dist/libhalo.js-keyless.pem
|
||||
asset_name: libhalo.js-keyless.pem
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload release asset (cosign sig)
|
||||
@@ -113,7 +114,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.out_store.outputs.release_upload_url }}
|
||||
asset_path: ./web/dist/libhalo.js-keyless.sig
|
||||
asset_path: ./core/dist/libhalo.js-keyless.sig
|
||||
asset_name: libhalo.js-keyless.sig
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
@@ -143,7 +144,10 @@ jobs:
|
||||
node-version: 20
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- name: Run npm ci
|
||||
run: yarn install --frozen-lockfile --production=false
|
||||
run: |
|
||||
cd core
|
||||
yarn install --frozen-lockfile --production=false
|
||||
./node_modules/.bin/tsc
|
||||
- name: Publish package to npmjs
|
||||
run: yarn publish
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user