-
Notifications
You must be signed in to change notification settings - Fork 20
48 lines (38 loc) · 1.17 KB
/
release.yml
File metadata and controls
48 lines (38 loc) · 1.17 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
on:
release:
types: [published]
name: Release
jobs:
release:
name: Build and Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# check if tagged version matches federation-sdk version
- name: Check version
run: |
TAG_VERSION="${{ github.event.release.tag_name }}"
SDK_VERSION=$(jq -r '.version' packages/federation-sdk/package.json)
if [ "$TAG_VERSION" != "$SDK_VERSION" ]; then
echo "Tag version ($TAG_VERSION) does not match federation-sdk version ($SDK_VERSION)"
exit 1
fi
- name: Cache turbo build setup
uses: actions/cache@v5
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun run build
- run: bun run lint
- run: bun run test
- run: bun run bundle:sdk
- name: Publish to NPM
env:
NPM_CONFIG_TOKEN: ${{ secrets.NPM_CONFIG_TOKEN }}
run: |
cd ./federation-bundle
bun publish --access public