From 4625b65babe6a1fd29c71c4ff04e93552d0b203d Mon Sep 17 00:00:00 2001 From: Morgan Dean Date: Wed, 25 Jun 2025 16:19:25 -0700 Subject: [PATCH] Create (untested) npm deploy workflows --- .github/workflows/publish-computer-ts.yml | 32 ++++++++++++++++ .github/workflows/publish-core-ts.yml | 32 ++++++++++++++++ .../computer/.github/_workflows/release.yml | 26 ------------- .../computer/.github/_workflows/unit-test.yml | 38 ------------------- .../core/.github/_workflows/release.yml | 26 ------------- .../core/.github/_workflows/unit-test.yml | 38 ------------------- libs/typescript/core/.vscode/settings.json | 3 -- 7 files changed, 64 insertions(+), 131 deletions(-) create mode 100644 .github/workflows/publish-computer-ts.yml create mode 100644 .github/workflows/publish-core-ts.yml delete mode 100644 libs/typescript/computer/.github/_workflows/release.yml delete mode 100644 libs/typescript/computer/.github/_workflows/unit-test.yml delete mode 100644 libs/typescript/core/.github/_workflows/release.yml delete mode 100644 libs/typescript/core/.github/_workflows/unit-test.yml delete mode 100644 libs/typescript/core/.vscode/settings.json diff --git a/.github/workflows/publish-computer-ts.yml b/.github/workflows/publish-computer-ts.yml new file mode 100644 index 00000000..6d9f72d9 --- /dev/null +++ b/.github/workflows/publish-computer-ts.yml @@ -0,0 +1,32 @@ +name: Publish @cua/computer to npm + +on: + push: + tags: + - 'computer-v*' + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js LTS + uses: actions/setup-node@v4 + with: + node-version: lts/* + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + working-directory: ./libs/typescript/computer + run: npm ci + + - name: Build package + working-directory: ./libs/typescript/computer + run: npm run build --if-present + + - name: Publish to npm + working-directory: ./libs/typescript/computer + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/publish-core-ts.yml b/.github/workflows/publish-core-ts.yml new file mode 100644 index 00000000..61e26283 --- /dev/null +++ b/.github/workflows/publish-core-ts.yml @@ -0,0 +1,32 @@ +name: Publish @cua/core to npm + +on: + push: + tags: + - 'core-v*' + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js LTS + uses: actions/setup-node@v4 + with: + node-version: lts/* + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + working-directory: ./libs/typescript/core + run: npm ci + + - name: Build package + working-directory: ./libs/typescript/core + run: npm run build --if-present + + - name: Publish to npm + working-directory: ./libs/typescript/core + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/libs/typescript/computer/.github/_workflows/release.yml b/libs/typescript/computer/.github/_workflows/release.yml deleted file mode 100644 index e5b7a4c3..00000000 --- a/libs/typescript/computer/.github/_workflows/release.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Release - -permissions: - contents: write - -on: - push: - tags: - - 'v*' - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set node - uses: actions/setup-node@v4 - with: - node-version: lts/* - - - run: npx changelogithub - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/libs/typescript/computer/.github/_workflows/unit-test.yml b/libs/typescript/computer/.github/_workflows/unit-test.yml deleted file mode 100644 index dc3418c5..00000000 --- a/libs/typescript/computer/.github/_workflows/unit-test.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Unit Test - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install pnpm - uses: pnpm/action-setup@v4.1.0 - - - name: Set node LTS - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: pnpm - - - name: Install - run: pnpm install - - - name: Build - run: pnpm run build - - - name: Lint - run: pnpm run lint - - - name: Typecheck - run: pnpm run typecheck - - - name: Test - run: pnpm run test diff --git a/libs/typescript/core/.github/_workflows/release.yml b/libs/typescript/core/.github/_workflows/release.yml deleted file mode 100644 index e5b7a4c3..00000000 --- a/libs/typescript/core/.github/_workflows/release.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Release - -permissions: - contents: write - -on: - push: - tags: - - 'v*' - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set node - uses: actions/setup-node@v4 - with: - node-version: lts/* - - - run: npx changelogithub - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/libs/typescript/core/.github/_workflows/unit-test.yml b/libs/typescript/core/.github/_workflows/unit-test.yml deleted file mode 100644 index dc3418c5..00000000 --- a/libs/typescript/core/.github/_workflows/unit-test.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Unit Test - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install pnpm - uses: pnpm/action-setup@v4.1.0 - - - name: Set node LTS - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: pnpm - - - name: Install - run: pnpm install - - - name: Build - run: pnpm run build - - - name: Lint - run: pnpm run lint - - - name: Typecheck - run: pnpm run typecheck - - - name: Test - run: pnpm run test diff --git a/libs/typescript/core/.vscode/settings.json b/libs/typescript/core/.vscode/settings.json deleted file mode 100644 index ad92582b..00000000 --- a/libs/typescript/core/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "editor.formatOnSave": true -}