diff options
author | 2023-10-09 12:14:26 -0700 | |
---|---|---|
committer | 2023-10-09 12:14:26 -0700 | |
commit | 3667b93871470aaa018e59365b16d7cf6584a5f9 (patch) | |
tree | 5eeadcb485cd07646bda09cd34cd33fe6950b605 | |
parent | 0a8aab6b23c339a2d865d38076ea48722dc9ce9c (diff) | |
download | bun-3667b93871470aaa018e59365b16d7cf6584a5f9.tar.gz bun-3667b93871470aaa018e59365b16d7cf6584a5f9.tar.zst bun-3667b93871470aaa018e59365b16d7cf6584a5f9.zip |
Fix npm tag for canary bun-types, again
-rw-r--r-- | .github/workflows/bun-release-types-canary.yml | 54 | ||||
-rw-r--r-- | .github/workflows/bun-release.yml | 12 |
2 files changed, 10 insertions, 56 deletions
diff --git a/.github/workflows/bun-release-types-canary.yml b/.github/workflows/bun-release-types-canary.yml deleted file mode 100644 index d4bfca08c..000000000 --- a/.github/workflows/bun-release-types-canary.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: bun-release-types-canary -concurrency: release-canary -on: - push: - branches: - - main - paths: - - "packages/bun-types/**" - workflow_dispatch: -jobs: - npm-types: - name: Release types to NPM - runs-on: ubuntu-latest - if: github.repository_owner == 'oven-sh' - defaults: - run: - working-directory: packages/bun-types - steps: - - id: checkout - name: Checkout - uses: actions/checkout@v3 - - id: setup-node - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: latest - - id: setup-bun - name: Setup Bun - uses: oven-sh/setup-bun@v1 - with: - bun-version: canary - - id: bun-install - name: Install Dependencies - run: bun install - - id: setup-env - name: Setup Environment - run: | - SHA=$(git rev-parse --short "$GITHUB_SHA") - VERSION=$(bun --version) - TAG="${VERSION}-canary.$(date +'%Y%m%dT%H%M%S')" - echo "Setup tag: ${TAG}" - echo "TAG=${TAG}" >> ${GITHUB_ENV} - - id: bun-run - name: Build - run: bun run build - env: - BUN_VERSION: ${{ env.TAG }} - - id: npm-publish - name: Release - uses: JS-DevTools/npm-publish@v1 - with: - package: packages/bun-types/dist/package.json - token: ${{ secrets.NPM_TOKEN }} - tag: canary diff --git a/.github/workflows/bun-release.yml b/.github/workflows/bun-release.yml index 85f1eaa28..2a14bf836 100644 --- a/.github/workflows/bun-release.yml +++ b/.github/workflows/bun-release.yml @@ -113,7 +113,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@v1 with: - bun-version: canary + bun-version: latest - name: Install Dependencies run: bun install - name: Setup Tag @@ -127,7 +127,15 @@ jobs: run: bun run build env: BUN_VERSION: ${{ env.TAG || env.BUN_VERSION }} - - name: Release + - name: Release (canary) + if: ${{ env.BUN_VERSION == 'canary' }} + uses: JS-DevTools/npm-publish@v1 + with: + package: packages/bun-types/dist/package.json + token: ${{ secrets.NPM_TOKEN }} + tag: canary + - name: Release (latest) + if: ${{ env.BUN_LATEST == 'true' }} uses: JS-DevTools/npm-publish@v1 with: package: packages/bun-types/dist/package.json |