-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (59 loc) · 1.53 KB
/
publish.yml
File metadata and controls
65 lines (59 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Publish Package to npm
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions: write-all
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun i
- run: bun lint
- run: bun run build
- run: bun lint
- run: bun test --coverage --coverage-reporter=lcov --coverage-reporter=text
- name: Upload to codecov.io
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./coverage/lcov.info
if: github.ref == 'refs/heads/main'
changepacks:
name: changepacks
runs-on: ubuntu-latest
permissions:
# create pull request comments
pull-requests: write
# Actions > General > Workflow permissions for creating pull request
# Create brench to create pull request
contents: write
needs:
- check
steps:
- uses: actions/checkout@v5
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun i
- run: bun run build
- uses: changepacks/action@main
id: changepacks
with:
publish: true
env:
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
outputs:
changepacks: ${{ steps.changepacks.outputs.changepacks }}