-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (59 loc) · 1.66 KB
/
release.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
name: Release
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-npm
- run: npm test
changelog:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
releases_created: ${{ steps.tag-release.outputs.releases_created }}
steps:
- uses: googleapis/release-please-action@v4
id: tag-release
with:
release-type: node
package-name: hoverboard
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Other Changes","hidden":false}]'
release-staging:
name: staging
environment: staging
concurrency: staging
needs:
- changelog
- test
# deploy staging if not a release, otherwise deploy to prod
if: needs.changelog.outputs.releases_created == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-npm
- uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_TOKEN }}
environment: 'staging'
release-production:
name: production
environment: production
concurrency: production
needs:
- changelog
- test
if: needs.changelog.outputs.releases_created
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-npm
- uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_TOKEN }}
environment: 'production'