-
Notifications
You must be signed in to change notification settings - Fork 5.5k
72 lines (64 loc) · 2.34 KB
/
nightly-build.yml
File metadata and controls
72 lines (64 loc) · 2.34 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
67
68
69
70
71
72
name: Nightly Build
on:
schedule:
# Run daily at 02:00 UTC
- cron: '0 2 * * *'
workflow_dispatch:
permissions:
contents: read
id-token: write # required for s3 uploads
jobs:
build-dist-browserify:
uses: ./.github/workflows/run-build.yml
with:
build-name: build-dist-browserify
build-command: yarn build dist
secrets: inherit
build-dist-mv2-browserify:
uses: ./.github/workflows/run-build.yml
with:
build-name: build-dist-mv2-browserify
build-command: yarn build dist
mozilla-lint: true
enable-mv3: false
secrets: inherit
build-experimental-browserify:
uses: ./.github/workflows/run-build.yml
with:
build-name: build-experimental-browserify
build-command: yarn build --build-type experimental dist
secrets: inherit
build-experimental-mv2-browserify:
uses: ./.github/workflows/run-build.yml
with:
build-name: build-experimental-mv2-browserify
build-command: yarn build --build-type experimental dist
mozilla-lint: true
enable-mv3: false
secrets: inherit
post-nightly-builds:
needs:
- build-dist-browserify
- build-dist-mv2-browserify
- build-experimental-browserify
- build-experimental-mv2-browserify
runs-on: ubuntu-latest
if: ${{ always() }}
env:
OWNER: ${{ github.repository_owner }}
REPOSITORY: ${{ github.event.repository.name }}
RUN_ID: ${{ github.run_id }}
# For scheduled runs, use the default branch
BRANCH: ${{ github.ref_name || 'main' }}
HOST_URL: ${{ vars.AWS_CLOUDFRONT_URL }}/${{ github.event.repository.name }}/${{ github.run_id }}
SLACK_NIGHTLY_BUILDS_WEBHOOK_URL: ${{ secrets.SLACK_NIGHTLY_BUILDS_WEBHOOK_URL }}
BUILD_STATUS: ${{ needs.build-dist-browserify.result == 'success' && needs.build-dist-mv2-browserify.result == 'success' && needs.build-experimental-browserify.result == 'success' && needs.build-experimental-mv2-browserify.result == 'success' && 'success' || 'failure' }}
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
with:
is-high-risk-environment: false
skip-allow-scripts: true
yarn-custom-url: ${{ vars.YARN_URL }}
- name: Post nightly builds notification
run: yarn tsx .github/scripts/post-nightly-builds.ts