Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
ci: bun
Browse files Browse the repository at this point in the history
  • Loading branch information
skick1234 committed May 23, 2024
1 parent 0fc3550 commit e1cdd8a
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 38 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/lint.yml

This file was deleted.

26 changes: 17 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
name: Publish @distube/soundcloud
on:
release:
types: [created]
types: [published]
jobs:
build:
name: Build & Publish
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
- name: Install Node.js 20
uses: actions/setup-node@v4
with:
node-version: 18
cache: "yarn"
cache-dependency-path: yarn.lock
node-version: 20
registry-url: "https://registry.npmjs.org"

- name: Install Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: yarn --immutable
run: bun install --frozen-lockfile

- name: Publish
run: yarn npm publish --access public
run: |
npm publish --provenance --access public
npm deprecate @distube/soundcloud@"< ${{ github.event.release.tag_name }}" "This version is deprecated, please upgrade to the latest version."
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test
on: [push, pull_request]
jobs:
test:
name: Test on Node.js v20 (ubuntu-latest)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"

- name: Install Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Linting
run: bun --bun run lint

- name: Run TypeScript compiler
run: bun --bun run build:check
Binary file modified bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"prettier": "prettier --write \"**/*.{js,ts,json,yml,yaml,md}\"",
"build": "tsup",
"build:check": "tsc --noEmit",
"update": "ncu -u && yarn up '**' -R",
"update": "ncu -u && bun update",
"postinstall": "husky",
"prepack": "yarn build && pinst -d",
"prepack": "bun run build && pinst -d",
"postpack": "pinst -e",
"prepare": "husky"
},
Expand Down

0 comments on commit e1cdd8a

Please sign in to comment.