-
Notifications
You must be signed in to change notification settings - Fork 413
66 lines (62 loc) · 2.01 KB
/
release.yml
File metadata and controls
66 lines (62 loc) · 2.01 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
name: Release
on:
push:
branches: ['main']
env:
FORCE_COLOR: 1
jobs:
create-release-pr:
name: Create Release PR
runs-on: ubuntu-24.04
permissions:
contents: write
pull-requests: write
timeout-minutes: 5
concurrency: ${{ github.workflow }}-create-release-pr
outputs:
published: ${{ steps.create-release-pr.outputs.published }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Create Release PR
id: create-release-pr
uses: changesets/action@v1
with:
publish: pnpm changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Save Published Packages
if: steps.create-release-pr.outputs.published == 'true'
run: |
echo '${{steps.create-release-pr.outputs.publishedPackages}}' \
> ${{ github.workspace }}/published-packages.json
- name: Upload Published Packages
if: steps.create-release-pr.outputs.published == 'true'
uses: actions/upload-artifact@v4
with:
name: published-packages
path: ${{ github.workspace }}/published-packages.json
deploy-production:
name: Deploy (production)
needs: create-release-pr
if: needs.create-release-pr.outputs.published == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 10
concurrency: ${{ github.workflow }}-deploy-production
permissions:
contents: read
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Download published packages
uses: actions/download-artifact@v4
with:
name: published-packages
path: ${{ runner.temp }}
- uses: ./.github/actions/setup
- name: Deploy Published Workers (production)
run: pnpm runx deploy-published-workers --env production
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}