-
Notifications
You must be signed in to change notification settings - Fork 1
111 lines (111 loc) · 3.15 KB
/
denylist.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: denylist
on:
push:
branches:
- main
paths:
- 'packages/denylist/**'
- '.github/workflows/denylist.yml'
- 'pnpm-lock.yaml'
pull_request:
paths:
- 'packages/denylist/**'
- '.github/workflows/denylist.yml'
- 'pnpm-lock.yaml'
jobs:
check:
runs-on: ubuntu-latest
name: Lint
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
- run: pnpm install
- run: pnpm build:denylist
- name: Lint
run: pnpm lint
test:
runs-on: ubuntu-latest
name: Test
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
- run: pnpm install
- run: pnpm test:denylist
deploy-staging:
name: Deploy Staging
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
- run: pnpm install
- name: Publish app
uses: cloudflare/wrangler-action@v3
env:
ENV: 'staging' # inform the build process what the env is
SENTRY_TOKEN: ${{secrets.SENTRY_TOKEN}}
SENTRY_UPLOAD: ${{ secrets.SENTRY_UPLOAD }}
with:
apiToken: ${{secrets.CF_TOKEN }}
workingDirectory: 'packages/denylist'
environment: 'staging'
changelog:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
paths_released: ${{ steps.tag-release.outputs.paths_released }}
steps:
- uses: googleapis/release-please-action@v4
id: tag-release
with:
path: packages/denylist
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
include-component-in-tag: true
config-file: .github/release-please-config.json
manifest-file: .github/release-please-manifest.json
release:
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && contains(fromJson(needs.changelog.outputs.paths_released), 'packages/denylist')
name: Release
runs-on: ubuntu-latest
needs:
- check
- test
- changelog
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: 20
registry-url: 'https://registry.npmjs.org'
- run: pnpm install
- name: Deploy
uses: cloudflare/wrangler-action@v3
env:
ENV: 'production' # inform the build process what the env is
SENTRY_TOKEN: ${{ secrets.SENTRY_TOKEN }}
SENTRY_UPLOAD: ${{ secrets.SENTRY_UPLOAD }}
with:
apiToken: ${{ secrets.CF_TOKEN }}
workingDirectory: 'packages/denylist'
environment: 'production'