declapract-typescript-ehmpathy 0.36.0 → 0.36.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/practices/cicd-app-react-native-expo/best-practice/.github/workflows/.deploy-expo.yml
CHANGED
|
@@ -51,10 +51,11 @@ jobs:
|
|
|
51
51
|
deploy-os:
|
|
52
52
|
strategy:
|
|
53
53
|
matrix:
|
|
54
|
-
platform:
|
|
54
|
+
platform:
|
|
55
|
+
- ios
|
|
56
|
+
- android
|
|
55
57
|
name: ${{ matrix.platform }}
|
|
56
58
|
runs-on: ubuntu-latest
|
|
57
|
-
if: ${{ inputs.stage == 'prod' }}
|
|
58
59
|
steps:
|
|
59
60
|
- name: checkout
|
|
60
61
|
uses: actions/checkout@v3
|
|
@@ -149,4 +150,4 @@ jobs:
|
|
|
149
150
|
run: npm run build:web
|
|
150
151
|
|
|
151
152
|
- name: deploy
|
|
152
|
-
run: aws s3 sync ./dist ${{ inputs.web-deployment-s3-bucket }} --delete --cache-control max-age=60,stale-while-revalidate=604800 # todo: fine tune the cache control; https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#stale-while-revalidate
|
|
153
|
+
run: aws s3 sync ./dist ${{ inputs.app-web-deployment-s3-bucket }} --delete --cache-control max-age=60,stale-while-revalidate=604800 # todo: fine tune the cache control; https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#stale-while-revalidate
|
package/dist/practices/cicd-app-react-native-expo/best-practice/.github/workflows/deploy.yml
CHANGED
|
@@ -7,6 +7,24 @@ on:
|
|
|
7
7
|
branches:
|
|
8
8
|
- 'main'
|
|
9
9
|
- 'master'
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
inputs:
|
|
12
|
+
stage:
|
|
13
|
+
description: 'which stage do you want to deploy to?'
|
|
14
|
+
type: choice
|
|
15
|
+
options:
|
|
16
|
+
- dev
|
|
17
|
+
- prod
|
|
18
|
+
required: true
|
|
19
|
+
default: 'dev'
|
|
20
|
+
thoroughly:
|
|
21
|
+
description: 'should we run tests before this deployment?'
|
|
22
|
+
type: choice
|
|
23
|
+
required: true
|
|
24
|
+
default: 'true'
|
|
25
|
+
options:
|
|
26
|
+
- 'true'
|
|
27
|
+
- 'false'
|
|
10
28
|
|
|
11
29
|
concurrency:
|
|
12
30
|
group: ${{ github.workflow }}-${{ github.ref }} # per [workflow] x [branch, tag]
|
|
@@ -15,33 +33,38 @@ concurrency:
|
|
|
15
33
|
jobs:
|
|
16
34
|
test:
|
|
17
35
|
uses: ./.github/workflows/.test.yml
|
|
36
|
+
if: github.event_name != 'workflow_dispatch' || github.event.inputs.thoroughly == 'true'
|
|
18
37
|
with:
|
|
19
38
|
aws-region: us-east-1
|
|
20
|
-
aws-account-id: '
|
|
39
|
+
aws-account-id: '419351972351'
|
|
21
40
|
secrets:
|
|
22
41
|
aws-access-key-id: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }}
|
|
23
42
|
aws-secret-access-key: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }}
|
|
24
43
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
44
|
+
dev:
|
|
45
|
+
uses: ./.github/workflows/.deploy-expo.yml
|
|
46
|
+
needs: [test]
|
|
47
|
+
# dont deploy on merge to main by default, since builds are expensive
|
|
48
|
+
if: |
|
|
49
|
+
((github.ref == 'refs/heads/main' && github.event_name != 'workflow_dispatch' && false) || github.event.inputs.stage == 'dev') &&
|
|
50
|
+
always() && (needs.test.result == 'success' || needs.test.result == 'skipped')
|
|
51
|
+
with:
|
|
52
|
+
stage: dev
|
|
53
|
+
build: development
|
|
54
|
+
github-environment: dev
|
|
55
|
+
aws-region: us-east-1
|
|
56
|
+
aws-account-id: '@declapract{variable.awsAccountId.dev}'
|
|
57
|
+
secrets:
|
|
58
|
+
expo-token: ${{ secrets.EXPO_TOKEN }}
|
|
59
|
+
aws-access-key-id: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }}
|
|
60
|
+
aws-secret-access-key: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }}
|
|
40
61
|
|
|
41
62
|
prod:
|
|
42
63
|
uses: ./.github/workflows/.deploy-expo.yml
|
|
43
|
-
if: startsWith(github.ref, 'refs/tags/')
|
|
44
64
|
needs: [test]
|
|
65
|
+
if: |
|
|
66
|
+
(startsWith(github.ref, 'refs/tags/') && github.event_name != 'workflow_dispatch') || (github.event.inputs.stage == 'prod') &&
|
|
67
|
+
always() && (needs.test.result == 'success' || needs.test.result == 'skipped')
|
|
45
68
|
with:
|
|
46
69
|
stage: prod
|
|
47
70
|
build: production
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "declapract-typescript-ehmpathy",
|
|
3
3
|
"author": "ehmpathy",
|
|
4
4
|
"description": "declapract best practices declarations for typescript",
|
|
5
|
-
"version": "0.36.
|
|
5
|
+
"version": "0.36.2",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "src/index.js",
|
|
8
8
|
"repository": "ehmpathy/declapract-typescript-ehmpathy",
|