refactor!: migrate to bun (#57) #217
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_run: | |
workflows: | |
- Spec | |
types: | |
- completed | |
push: | |
branches: | |
- main | |
permissions: | |
id-token: write | |
jobs: | |
release: | |
name: Release | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Generate Token | |
id: generate_token | |
uses: tibdex/github-app-token@v2 | |
with: | |
app_id: ${{ secrets.ARCHOLEATER_APP_ID }} | |
private_key: ${{ secrets.ARCHOLEATER_APP_PRIVATE_KEY }} | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ steps.generate_token.outputs.token }} | |
- name: Set Up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: latest | |
- name: Set Up Bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Install Dependencies | |
run: bun i | |
- name: Build | |
run: bun rollup -c rollup.config.ts --configPlugin typescript | |
- name: Sanitize | |
run: rm -rf 'dist/{config,data,utils}' | |
- name: Prettify | |
run: bun prettier 'dist/index.d.ts' --write | |
- name: Create Release | |
env: | |
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} | |
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
run: bun semantic-release |