From c43797d09a770c9c7d0316fff00ce8658f98120a Mon Sep 17 00:00:00 2001 From: "Zaid Arshad (Nico)" Date: Thu, 21 Mar 2024 05:02:48 -0400 Subject: [PATCH] chore: release stuff --- .github/workflows/deploy.yml | 78 ++++++++++++------------ packages/api/package.json | 1 + packages/create-guilded-app/package.json | 3 +- packages/gil/package.json | 3 +- packages/guilded.js/package.json | 3 +- services/proxy/Dockerfile | 2 +- turbo.json | 6 ++ 7 files changed, 53 insertions(+), 43 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 66b68faa..eec860c6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -30,50 +30,50 @@ jobs: message: "chore: release" push: true - - name: Release - run: bun recursive publish + - name: Recursive Release + run: turbo run release env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - docker: - runs-on: ubuntu-latest - strategy: - matrix: - service-name: [proxy] - steps: - - name: Checkout - uses: actions/checkout@v2 + # docker: + # runs-on: ubuntu-latest + # strategy: + # matrix: + # service-name: [] + # steps: + # - name: Checkout + # uses: actions/checkout@v2 - - name: Verify Changed files - uses: dorny/paths-filter@v2 - id: verify-changed-files - with: - filters: | - service: - - 'services/${{ matrix.service-name }}/src/**' - - 'services/${{ matrix.service-name }}/package.json' + # - name: Verify Changed files + # uses: dorny/paths-filter@v2 + # id: verify-changed-files + # with: + # filters: | + # service: + # - 'services/${{ matrix.service-name }}/src/**' + # - 'services/${{ matrix.service-name }}/package.json' - - name: Set up QEMU - if: steps.verify-changed-files.outputs.service == 'true' - uses: docker/setup-qemu-action@v2 + # - name: Set up QEMU + # if: steps.verify-changed-files.outputs.service == 'true' + # uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - if: steps.verify-changed-files.outputs.service == 'true' - uses: docker/setup-buildx-action@v2 + # - name: Set up Docker Buildx + # if: steps.verify-changed-files.outputs.service == 'true' + # uses: docker/setup-buildx-action@v2 - - name: Login to GCR - if: steps.verify-changed-files.outputs.service == 'true' - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} + # - name: Login to GCR + # if: steps.verify-changed-files.outputs.service == 'true' + # uses: docker/login-action@v2 + # with: + # registry: ghcr.io + # username: ${{ github.repository_owner }} + # password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push - if: steps.verify-changed-files.outputs.service == 'true' - uses: docker/build-push-action@v3 - with: - context: . - push: true - tags: ghcr.io/${{ github.repository }}/${{ matrix.service-name }}:latest - file: services/${{ matrix.service-name }}/Dockerfile + # - name: Build and push + # if: steps.verify-changed-files.outputs.service == 'true' + # uses: docker/build-push-action@v3 + # with: + # context: . + # push: true + # tags: ghcr.io/${{ github.repository }}/${{ matrix.service-name }}:latest + # file: services/${{ matrix.service-name }}/Dockerfile diff --git a/packages/api/package.json b/packages/api/package.json index 0241bad1..4d053cc0 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -10,6 +10,7 @@ "build": "tsc && gen-esm-wrapper . ./dist/index.mjs", "build:typecheck": "tsc --noEmit", "prepublishOnly": "rimraf dist/ && rimraf types/ && bun run build", + "release": "changeset publish", "router:preserve": "ts-node scripts/pre-gen-router.ts", "router:restore": "ts-node scripts/post-gen-router.ts", "generate:ws": "openapi-typescript \"https://www.guilded.gg/api/v1/socket-open-api-schema.json\" --output lib/generated/api-typings/v1/ws.ts", diff --git a/packages/create-guilded-app/package.json b/packages/create-guilded-app/package.json index 05a1c135..259321ca 100644 --- a/packages/create-guilded-app/package.json +++ b/packages/create-guilded-app/package.json @@ -12,7 +12,8 @@ "scripts": { "build": "tsc", "build:typecheck": "tsc --noEmit", - "prepublishOnly": "rimraf dist/ && rimraf types/ && bun run build" + "prepublishOnly": "rimraf dist/ && rimraf types/ && bun run build", + "release": "changeset publish" }, "devDependencies": { "@types/node": "18.16.12", diff --git a/packages/gil/package.json b/packages/gil/package.json index b8923fb7..d77974b2 100644 --- a/packages/gil/package.json +++ b/packages/gil/package.json @@ -10,7 +10,8 @@ "test": "ts-node test/index.ts", "build": "tsc && gen-esm-wrapper . ./dist/index.mjs", "build:typecheck": "tsc --noEmit", - "prepublishOnly": "rimraf dist/ && rimraf types/ && bun run build" + "prepublishOnly": "rimraf dist/ && rimraf types/ && bun run build", + "release": "changeset publish" }, "devDependencies": { "dotenv": "^16.0.3", diff --git a/packages/guilded.js/package.json b/packages/guilded.js/package.json index 6fb74d0c..6aee9e34 100644 --- a/packages/guilded.js/package.json +++ b/packages/guilded.js/package.json @@ -9,7 +9,8 @@ "scripts": { "build": "tsc && gen-esm-wrapper . ./dist/index.mjs", "build:typecheck": "tsc --noEmit", - "prepublishOnly": "rimraf dist/ && rimraf types/ && bun run build" + "prepublishOnly": "rimraf dist/ && rimraf types/ && bun run build", + "release": "changeset publish" }, "devDependencies": { "@types/node": "18.16.12", diff --git a/services/proxy/Dockerfile b/services/proxy/Dockerfile index 23f3abac..c4a37b57 100644 --- a/services/proxy/Dockerfile +++ b/services/proxy/Dockerfile @@ -6,7 +6,7 @@ RUN apk add --update \ && apk add --no-cache --virtual .build-deps curl \ && corepack enable && corepack prepare pnpm@8.6.3 --activate -COPY tsconfig.json package.json pnpm-lock.yaml pnpm-workspace.yaml ./ +COPY tsconfig.json package.json bun.lockb ./ COPY ./packages/api/. ./packages/api/ COPY ./services/proxy/package.json ./services/proxy/tsconfig.json ./services/proxy/ diff --git a/turbo.json b/turbo.json index d5ab0f1f..e12c2ea8 100644 --- a/turbo.json +++ b/turbo.json @@ -44,6 +44,12 @@ "^prepublishOnly" ], "cache": false + }, + "release": { + "dependsOn": [ + "^release" + ], + "cache": false } } } \ No newline at end of file