This repository was archived by the owner on Feb 22, 2024. It is now read-only.
forked from deriv-com/smarttrader
-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (81 loc) · 2.3 KB
/
release_production.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
name: DSmartTrader Production Release
on:
push:
tags:
- production_*
jobs:
build_and_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install dependencies
uses: "./.github/actions/npm_install"
- name: Build
uses: "./.github/actions/build"
with:
target: production
- name: Versioning
uses: "./.github/actions/versioning"
with:
target_branch: production
- name: "Run Tests"
run: npm run test
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
publish_cloudflare_production:
name: Publish to Cloudflare Production
runs-on: ubuntu-latest
needs: [build_and_test]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Download Artifacts
uses: actions/[email protected]
with:
name: dist
- name: Publish to Cloudflare
uses: "./.github/actions/publish_to_pages_production"
with:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
notify_on_slack:
name: Notify on Slack
if: always()
runs-on: ubuntu-latest
needs: [publish_cloudflare_production, build_and_test]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Conclusion
uses: technote-space/workflow-conclusion-action@v3
- name: Download Artifacts
uses: actions/[email protected]
with:
name: dist
- name: Grab Version Name
id: extract_version
run: echo "RELEASE_VERSION=${version}" >> $GITHUB_ENV
- name: Send Slack Notification
uses: "./.github/actions/notify_slack"
with:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
status: ${{ env.WORKFLOW_CONCLUSION }}
release_type: Production
version: ${{ steps.extract_version.outputs.RELEASE_VERSION}}