aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Ashcon Partovi <ashcon@partovi.net> 2023-02-01 14:00:31 -0800
committerGravatar Ashcon Partovi <ashcon@partovi.net> 2023-02-01 14:00:31 -0800
commit7f853af6f042fc573549abffbc968d13d69dd839 (patch)
tree0dfdeb0bbb87f24393229f8d6e61362af56ac1e3
parent04309431bb8de21878a24aa6cb0703f21f8b8123 (diff)
downloadbun-7f853af6f042fc573549abffbc968d13d69dd839.tar.gz
bun-7f853af6f042fc573549abffbc968d13d69dd839.tar.zst
bun-7f853af6f042fc573549abffbc968d13d69dd839.zip
Add bun-types release to workflow
-rw-r--r--.github/workflows/bun-release.yml47
-rw-r--r--.github/workflows/bun-types-release.yml38
2 files changed, 46 insertions, 39 deletions
diff --git a/.github/workflows/bun-release.yml b/.github/workflows/bun-release.yml
index 5a98ae2a3..3fd33bc33 100644
--- a/.github/workflows/bun-release.yml
+++ b/.github/workflows/bun-release.yml
@@ -43,6 +43,51 @@ 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-env
+ name: Setup Environment
+ run: |
+ TAG="${{ github.event.inputs.tag }}"
+ TAG="${TAG:-"${{ github.event.release.tag_name }}"}"
+ echo "Setup tag: ${TAG}"
+ echo "TAG=${TAG}" >> ${GITHUB_ENV}
+ - 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@v0.1.8
+ with:
+ bun-version: canary
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ - id: bun-install
+ name: Install Dependencies
+ run: |
+ bun upgrade --canary
+ bun install
+ - 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: ${{ env.TAG }}
docker:
name: Release to Dockerhub
runs-on: ubuntu-latest
@@ -127,7 +172,7 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_options: --gpg-sign=${{ steps.setup-gpg.outputs.keyid }}
- commit_message: Release v${{ env.TAG }}
+ commit_message: Bun v${{ env.TAG }}
commit_user_name: robobun
commit_user_email: robobun@oven.sh
commit_author: robobun <robobun@oven.sh>
diff --git a/.github/workflows/bun-types-release.yml b/.github/workflows/bun-types-release.yml
deleted file mode 100644
index b7ee0bdff..000000000
--- a/.github/workflows/bun-types-release.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-name: Release bun-types
-on:
- workflow_dispatch:
-
-jobs:
- test-build:
- name: Test & Build
- runs-on: ubuntu-latest
- if: github.repository_owner == 'oven-sh'
- defaults:
- run:
- working-directory: packages/bun-types
- steps:
- - uses: actions/checkout@v3
-
- - name: Install bun
- uses: oven-sh/setup-bun@v0.1.8
- with:
- bun-version: canary
- github-token: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Install node
- uses: actions/setup-node@v3
- with:
- node-version: latest
-
- - name: Install dependencies
- run: bun upgrade --canary; bun install
-
- - name: Build package
- run: bun run build
-
- - name: Publish to NPM
- uses: JS-DevTools/npm-publish@v1
- with:
- package: packages/bun-types/dist/package.json
- token: ${{ secrets.NPM_BUN_TYPES_TOKEN }}
- tag: latest