forked from andi23rosca/solid-markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 1.02 KB
/
Copy pathpublish.yml
File metadata and controls
37 lines (34 loc) · 1.02 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
name: Publish
permissions:
contents: read
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
# renovate: datasource=github-releases depName=oven-sh/bun
bun-version: "1.3.14"
- run: bun install --frozen-lockfile
- run: bun run lint
- run: bun run typecheck
- run: bun run test
- run: bun run build
- name: Resolve npm dist-tag from version
id: disttag
run: |
version=$(node -p "require('./package.json').version")
if [[ "$version" == *-* ]]; then
echo "tag=next" >> "$GITHUB_OUTPUT"
else
echo "tag=latest" >> "$GITHUB_OUTPUT"
fi
- run: bun publish --access public --tag ${{ steps.disttag.outputs.tag }}
env:
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}