-
Notifications
You must be signed in to change notification settings - Fork 3.9k
62 lines (55 loc) · 1.97 KB
/
cross-platform-builds.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
name: Cross-Platform Builds
on:
push:
branches:
- main
permissions:
contents: read
jobs:
compile:
if: github.repository == 'ampproject/amphtml'
strategy:
matrix:
platform: [ubuntu, macos, windows]
flavor: [Build, Dist]
fail-fast: false
runs-on: ${{ matrix.platform }}-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Checkout Repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set Up Node
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: lts/*
- name: Install Dependencies
run: bash ./.github/workflows/install_dependencies.sh
- name: ${{ matrix.flavor }}
run: node build-system/pr-check/cross-platform-builds.js --flavor=${{ matrix.flavor }}
create-issue-on-error:
if: failure()
needs: compile
permissions:
contents: read
issues: write
runs-on: ubuntu-latest
environment: create_issue_on_error
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Create issue on error
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 # v2.9.2
with:
filename: .github/create_issue_on_error.md
env:
GITHUB_TOKEN: ${{ secrets.AMPPROJECTBOT }}
WORKFLOW_NAME: ${{ github.workflow }}
MENTION: '@ampproject/release-on-duty'
REPO_SLUG: ${{ github.repository }}
RUN_ID: ${{ github.run_id }}