Skip to content

Commit 9214d12

Browse files
committed
feat: update CI
1 parent 6cc6fde commit 9214d12

File tree

6 files changed

+78
-237
lines changed

6 files changed

+78
-237
lines changed

.github/workflows/ci.yml

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

.github/workflows/feature.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "CI / Feature"
2+
3+
on:
4+
push:
5+
branches:
6+
- feature*
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
use-library-js-feature:
15+
permissions:
16+
contents: read
17+
actions: write
18+
checks: write
19+
uses: MatrixAI/.github/.github/workflows/library-js-feature.yml@master

.github/workflows/staging.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "CI / Staging"
2+
3+
on:
4+
push:
5+
branches:
6+
- staging
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
use-library-js-staging:
15+
permissions:
16+
contents: write
17+
actions: write
18+
checks: write
19+
pull-requests: write
20+
uses: MatrixAI/.github/.github/workflows/library-js-staging.yml@master
21+
secrets:
22+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
23+
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
24+
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
25+
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
26+
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }}
27+

.github/workflows/tag.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: "CI / Tag"
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
use-library-js-tag:
11+
permissions:
12+
contents: read
13+
actions: write
14+
uses: MatrixAI/.github/.github/workflows/library-js-tag.yml@master
15+
secrets:
16+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

flake.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
nixpkgs-matrix = {
44
type = "indirect";
55
id = "nixpkgs-matrix";
6-
inputs.nixpkgs.url =
7-
"github:NixOS/nixpkgs?rev=e69e710edfed397959507bcee120ec8a9c7ff03e";
86
};
97
flake-utils.url = "github:numtide/flake-utils";
108
};
@@ -13,17 +11,15 @@
1311
flake-utils.lib.eachDefaultSystem (system:
1412
let
1513
pkgs = nixpkgs-matrix.legacyPackages.${system};
16-
1714
shell = { ci ? false }:
1815
with pkgs;
19-
mkShell {
16+
pkgs.mkShell {
2017
nativeBuildInputs = [ nodejs_20 shellcheck gitAndTools.gh ];
21-
NIX_DONT_SET_RPATH = true;
22-
NIX_NO_SELF_RPATH = true;
18+
PKG_IGNORE_TAG = 1;
2319
shellHook = ''
2420
echo "Entering $(npm pkg get name)"
2521
set -o allexport
26-
. ./.env
22+
. <(polykey secrets env js-rpc)
2723
set +o allexport
2824
set -v
2925
${lib.optionalString ci ''
@@ -33,8 +29,11 @@
3329
shopt -s inherit_errexit
3430
''}
3531
mkdir --parents "$(pwd)/tmp"
32+
3633
export PATH="$(pwd)/dist/bin:$(npm root)/.bin:$PATH"
34+
3735
npm install --ignore-scripts
36+
3837
set +v
3938
'';
4039
};

0 commit comments

Comments
 (0)