-
Notifications
You must be signed in to change notification settings - Fork 8
88 lines (74 loc) · 2.21 KB
/
Copy pathrelease-beta.yml
File metadata and controls
88 lines (74 loc) · 2.21 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
name: Release Beta
on:
workflow_dispatch:
inputs:
ref:
description: "Git ref to release (branch, tag, or SHA)"
required: false
default: "main"
snapshot-tag:
description: "Snapshot suffix and npm dist-tag"
required: false
default: "beta"
concurrency: beta-release-${{ github.event.inputs.ref || 'main' }}
jobs:
beta-release:
name: Publish Beta
runs-on: ubuntu-latest
environment: publish
permissions:
contents: read
pull-requests: read
id-token: write
services:
mongodb:
image: mongo:7
ports:
- 27017:27017
options: >-
--health-cmd "mongosh --eval 'db.runCommand(\"ping\").ok'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
WORKFLOW_MONGODB_URI: "mongodb://localhost:27017/workflow-test"
WORKFLOW_REDIS_URI: "redis://localhost:6379"
WORKFLOW_TURSO_DATABASE_URL: "file:test.db"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref || 'main' }}
- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"
registry-url: "https://registry.npmjs.org"
- name: Upgrade npm for trusted publishing
run: npm install -g npm@latest
- name: Install dependencies
run: pnpm install
- name: Build packages
run: pnpm build
- name: Run tests
run: pnpm test
- name: Prepare snapshot versions
run: pnpm changeset version --snapshot ${{ github.event.inputs.snapshot-tag || 'beta' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish beta packages
run: pnpm changeset publish --tag ${{ github.event.inputs.snapshot-tag || 'beta' }}
env:
NPM_CONFIG_PROVENANCE: true