-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.25 KB
/
publish-package.yaml
File metadata and controls
52 lines (44 loc) · 1.25 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
name: Publish Package
on:
release:
types: [published]
workflow_dispatch:
jobs:
build-test-and-publish:
runs-on: ubuntu-latest
container: node:20
permissions:
packages: write
services:
redis:
image: redis:7.0
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out repository code
uses: actions/checkout@v5
- name: Install system dependencies
run: |
apt-get update
apt-get install -y unzip
- name: Setup bun
uses: oven-sh/setup-bun@v2
- name: Install project dependencies
run: bun install --frozen-lockfile
- name: Build
run: bun run build
- name: Test
env:
REDIS_URL: redis://redis:6379
run: bun run test
- name: Publish package to NPM
env:
NPM_CONFIG_TOKEN: ${{ secrets.NPM_CONFIG_TOKEN }}
run: bun publish --tolerate-republish --access public
- name: Publish package to GitHub
env:
NPM_CONFIG_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bun publish --tolerate-republish --access public --registry https://npm.pkg.github.com