-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from nutgaard/feat/ci
ci: add publishing workflow
- Loading branch information
Showing
3 changed files
with
45 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
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 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: 1.1.13 | ||
- 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}} |
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