-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (90 loc) · 2.68 KB
/
Copy pathrelease-cli.yml
File metadata and controls
104 lines (90 loc) · 2.68 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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Release CLI
on:
workflow_dispatch:
inputs:
tag:
description: Release tag, for example v0.1.0
required: true
type: string
server_url:
description: Deployed server URL to embed in the CLI
required: true
type: string
clerk_frontend_api:
description: Clerk Frontend API URL to embed in the CLI
required: true
type: string
clerk_oauth_client_id:
description: Clerk OAuth client id to embed in the CLI
required: true
type: string
clerk_oauth_redirect_uri:
description: Clerk OAuth redirect URI
required: false
default: http://127.0.0.1:8976/oauth/callback
type: string
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- name: darwin-arm64
runner: macos-14
- name: darwin-x64
runner: macos-13
- name: linux-x64
runner: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.13
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Typecheck CLI
run: bun run check:cli
- name: Package CLI
run: bun run package:cli-release
env:
SERVER_URL: ${{ inputs.server_url }}
CLERK_FRONTEND_API: ${{ inputs.clerk_frontend_api }}
CLERK_OAUTH_CLIENT_ID: ${{ inputs.clerk_oauth_client_id }}
CLERK_OAUTH_REDIRECT_URI: ${{ inputs.clerk_oauth_redirect_uri }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: newcode-${{ matrix.name }}
path: release/newcode-${{ matrix.name }}.tar.gz
if-no-files-found: error
publish:
name: Publish GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: release
merge-multiple: true
- name: Copy installer
run: cp scripts/install.sh release/install.sh
- name: Create release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.tag }}
name: ${{ inputs.tag }}
fail_on_unmatched_files: true
files: |
release/install.sh
release/newcode-darwin-arm64.tar.gz
release/newcode-darwin-x64.tar.gz
release/newcode-linux-x64.tar.gz