Skip to content

Commit

Permalink
ci: add publishing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nutgaard committed Jun 13, 2024
1 parent 8565f7d commit a97883f
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Test, build and publish

on:
push:
branches:
- master

env:
CI: true

permissions:
contents: write

jobs:
test-build-publish:
name: Test and build
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 18, 20 ]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v3
name: Setup node ${{ matrix.node }}
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
# - name: Test
# run: npm run test
- name: Build
run: bun run build
# - name: Report coverage
# if: ${{ matrix.node == '18' }}
# uses: codecov/codecov-action@v3
# - name: Publish docs
# if: ${{ matrix.node == '18' }}
# uses: crazy-max/ghaction-github-pages@v2
# with:
# build_dir: docs
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish package
if: ${{ matrix.node == '20' }}
run: bunx semantic-release
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
NPM_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit a97883f

Please sign in to comment.