-
Notifications
You must be signed in to change notification settings - Fork 5
86 lines (74 loc) · 2.45 KB
/
release.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Semantic Release
on:
workflow_dispatch:
push:
branches:
- main
- beta
jobs:
prepare-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set matrix for test
id: set-matrix
run: echo "matrix=$(find . -name '*.test.ts' | jq -R -s -c 'split("\n") | map(select(length > 0))')" >> $GITHUB_OUTPUT
test:
runs-on: ubuntu-latest
strategy:
matrix:
files: ${{fromJson(needs.prepare-matrix.outputs.matrix)}}
needs:
- prepare-matrix
steps:
- name: "☁️ checkout repository"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "🔧 setup Bun"
uses: oven-sh/setup-bun@v1
- name: "📦 install dependencies"
run: bun install
- name: "Run Vitest"
run: bun x vitest ${{ matrix.files }}
# - name: "Upload optimized models"
# - uses: actions/upload-artifact@v3
# with:
# name: qdrant-optimized-models
# path: local_cache/
release:
runs-on: ubuntu-latest
needs:
- test
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: "☁️ checkout repository"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "🔧 setup Bun"
uses: oven-sh/setup-bun@v1
- name: "📦 install dependencies"
run: bun install
- name: "Semantic release🚀"
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_COMMITTER_NAME: "github-actions[bot]"
GIT_COMMITTER_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
SKIP_CHANGELOG: true
uses: docker://ghcr.io/open-sauced/release:2.4.0
- name: "echo outputs"
run: |
echo "RELEASE_TAG: ${{ env.RELEASE_TAG }}"
echo "RELEASE_VERSION: ${{ env.RELEASE_VERSION }}"
echo "outputs.release-tag: ${{ steps.release.outputs.release-tag }}"
echo "outputs.release-version: ${{ steps.release.outputs.release-version }}"