Repository navigation
52 lines (52 loc) · 1.63 KB
/
Copy pathcli.yml
File metadata and controls
52 lines (52 loc) · 1.63 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: CLI checks and releases
on:
push:
branches: [main]
tags: ['v[0-9]*']
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') }}
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-15]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
persist-credentials: false
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: '1.4.4'
- run: bun install --frozen-lockfile
- run: bun run check && bun test && bun run build
- run: ./dist/pgstack --version
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: test
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: write
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
persist-credentials: false
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: '1.4.4'
- run: bun install --frozen-lockfile
- name: Check release version
run: test "$GITHUB_REF_NAME" = "v$(bun -p 'require("./package.json").version')"
- run: bun run build:releases
- name: Create draft release
env:
GH_TOKEN: ${{ github.token }}
run: gh release create "$GITHUB_REF_NAME" dist/releases/pgstack-* --verify-tag --draft --title "$GITHUB_REF_NAME" --generate-notes