Skip to content

Commit

Permalink
chore: hotfix release flow
Browse files Browse the repository at this point in the history
  • Loading branch information
zifeo committed Oct 4, 2023
1 parent ecd4f87 commit 4b2f27d
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 16 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
cache: "poetry"
- env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
WASM_FILE: target/release/typegraph_core.wasm
run: |
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v $WASMEDGE_VERSION
Expand All @@ -137,15 +137,16 @@ jobs:
poetry publish
cd ../..
npm install --global @bytecodealliance/jco@$JCO_VERSION
jco transpile $WASM_FILE -o typegraph/deno/src/gen --map "*=../imports.ts"
deno run -A typegraph/deno/dev/fix-declarations.ts
cd typegraph/deno/src
deno run -A ../../../dev/publish.ts
cd ../../..
npm install --global @bytecodealliance/jco@$JCO_VERSION
jco transpile $WASM_FILE -o typegraph/deno/src/gen --map "*=../imports.ts"
deno run -A typegraph/deno/dev/fix-declarations.ts
cd typegraph/node
pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
pnpm publish
- uses: svenstaro/upload-release-action@v2
with:
Expand Down Expand Up @@ -175,7 +176,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v5
id: prd
id: build
with:
file: dev/Dockerfile
platforms: ${{ matrix.platform }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ jobs:
- changes
- test-meta-cli
if: ${{ needs.changes.outputs.typegate == 'true' }}
runs-on: custom-linux
runs-on:
- self-hosted # https://check-jsonschema.readthedocs.io/en/latest/faq.html#using-self-hosted-runners
- custom-linux
timeout-minutes: 60
services:
redis:
Expand Down
13 changes: 9 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,21 @@ repos:
- id: end-of-file-fixer
# exclude all generated files
exclude: (typegate/deno.lock|.*\.snap$|typegate/src/typegraphs/.*\.json|website/docs/reference/)
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.0
hooks:
- id: check-dependabot
- id: check-github-workflows
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.282"
rev: "v0.0.292"
hooks:
- id: ruff
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/commitizen-tools/commitizen
rev: 3.6.0
rev: 3.10.0
hooks:
- id: commitizen
stages:
Expand Down Expand Up @@ -79,7 +84,7 @@ repos:
entry: bash -c 'deno run -A dev/lock.ts --check'
pass_filenames: false
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.1
rev: v1.5.4
hooks:
- id: insert-license
name: "License MPL-2.0 python"
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ Support us by <a href="https://github.com/metatypedev/metatype/stargazers">starr
<img src="https://img.shields.io/github/v/release/metatypedev/metatype?include_prereleases&label=meta-cli" alt="Meta CLI binary" />
</a>
<a href="https://pypi.org/project/typegraph/" target="_blank">
<img src="https://img.shields.io/pypi/v/typegraph?label=typegraph" alt="Python typegraph SDK" />
<img src="https://img.shields.io/pypi/v/typegraph?label=typegraph&logo=pypi" alt="Python typegraph SDK" />
</a>
<a href="https://www.npmjs.com/package/@typegraph/sdk" target="_blank">
<img src="https://img.shields.io/npm/v/@typegraph/sdk?label=@typegraph/sdk&logo=npm" alt="Typescript typegraph SDK" />
</a>
</p>

Expand Down
2 changes: 1 addition & 1 deletion typegraph/deno/src/providers/aws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
S3PresignPutParams,
S3RuntimeData,
} from "../gen/interfaces/metatype-typegraph-aws.d.ts";
import { t } from "@typegraph/deno/src/mod.ts";
import { t } from "../mod.ts";

type S3PresignGetMat = Materializer & S3PresignGetParams;
type S3PresignPutMat = Materializer & S3PresignPutParams;
Expand Down
4 changes: 2 additions & 2 deletions typegraph/deno/src/typegraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
serializeStaticInjection,
} from "./utils/injection_utils.ts";
import { Auth, Cors, Rate } from "./wit.ts";
import Policy from "@typegraph/deno/src/policy.ts";
import { getPolicyChain } from "@typegraph/deno/src/types.ts";
import Policy from "./policy.ts";
import { getPolicyChain } from "./types.ts";

type Exports = Record<string, t.Func>;

Expand Down
2 changes: 1 addition & 1 deletion typegraph/deno/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class Typedef {
return optional(this, data);
}

private withInjection(injection: string) {
withInjection(injection: string) {
const wrapperId = core.withInjection({
tpe: this._id,
injection,
Expand Down

0 comments on commit 4b2f27d

Please sign in to comment.