diff options
author | 2023-03-02 15:34:36 -0800 | |
---|---|---|
committer | 2023-03-02 15:34:36 -0800 | |
commit | 3852a52601757d45a17a4a26fb3f6361e4b1bac4 (patch) | |
tree | 1081f65af13d71c113cadd6ae1482519f8151883 | |
parent | 1ba007831dd6d3fd5ee02fab33b09d552107884d (diff) | |
download | bun-3852a52601757d45a17a4a26fb3f6361e4b1bac4.tar.gz bun-3852a52601757d45a17a4a26fb3f6361e4b1bac4.tar.zst bun-3852a52601757d45a17a4a26fb3f6361e4b1bac4.zip |
Add separate bun-types release CI (#2275)
* Release on every commit
* Remove bun-types publish from bun-release-canary
* Undo formatting changes
-rw-r--r-- | .github/workflows/bun-release-canary.yml | 86 | ||||
-rw-r--r-- | .github/workflows/bun-release-types-canary.yml | 53 | ||||
-rw-r--r-- | .vscode/settings.json | 3 |
3 files changed, 99 insertions, 43 deletions
diff --git a/.github/workflows/bun-release-canary.yml b/.github/workflows/bun-release-canary.yml index 1422842fb..7c7a8bea2 100644 --- a/.github/workflows/bun-release-canary.yml +++ b/.github/workflows/bun-release-canary.yml @@ -29,49 +29,49 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - npm-types: - name: Release types to NPM - runs-on: ubuntu-latest - 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%d').1+${SHA}" - 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 + # npm-types: + # name: Release types to NPM + # runs-on: ubuntu-latest + # 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%d').1+${SHA}" + # 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 docker: name: Release to Dockerhub runs-on: ubuntu-latest diff --git a/.github/workflows/bun-release-types-canary.yml b/.github/workflows/bun-release-types-canary.yml new file mode 100644 index 000000000..1962011a7 --- /dev/null +++ b/.github/workflows/bun-release-types-canary.yml @@ -0,0 +1,53 @@ +name: bun-release-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 + 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/.vscode/settings.json b/.vscode/settings.json index 3236532e0..b535a1bd5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -32,6 +32,9 @@ "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true }, + "[yaml]": { + "editor.formatOnSave": true + }, "zig.beforeDebugCmd": "make build-unit ${file} ${filter} ${bin}", "zig.testCmd": "make test ${file} ${filter} ${bin}", "[markdown]": { |