Skip to content

Commit b19bf29

Browse files
authored
update the specification validation workflow (#3351)
1 parent 4d1e996 commit b19bf29

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

.github/workflows/ci.yml renamed to .github/workflows/spec.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,25 @@
1-
name: CI
1+
name: Spec
22

33
on:
44
# Run on PRs and pushes to the default branch.
55
push:
66
branches: [ main ]
77
paths:
88
- 'specification/**'
9-
- '.github/workflows/ci.yml'
9+
- '.github/workflows/spec.yml'
1010
pull_request:
1111
branches: [ main ]
1212
paths:
1313
- 'specification/**'
14-
- '.github/workflows/ci.yml'
14+
- '.github/workflows/spec.yml'
1515

1616
jobs:
1717
specification:
1818
runs-on: ubuntu-latest
19-
if: |
20-
(
21-
(github.event_name == 'push'
22-
&& github.ref == 'refs/heads/main'
23-
&& github.repository == 'dart-lang/language'
24-
) ||
25-
(github.event.pull_request.head.repo.full_name == github.repository)
26-
)
2719

2820
steps:
2921
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
22+
3023
- name: Install latex tools
3124
run: |
3225
sudo apt-get update -qq
@@ -35,13 +28,17 @@ jobs:
3528
texlive-latex-extra \
3629
texlive-fonts-recommended \
3730
lmodern
31+
3832
- name: Build specification
3933
run: |
4034
cd specification
4135
make
4236
mkdir firebase
4337
cp dartLangSpec.pdf firebase/DartLangSpecDraft.pdf
44-
- uses: FirebaseExtended/action-hosting-deploy@120e124148ab7016bec2374e5050f15051255ba2
38+
39+
- name: Upload specification
40+
if: ${{ github.event.pull_request.merged }}
41+
uses: FirebaseExtended/action-hosting-deploy@120e124148ab7016bec2374e5050f15051255ba2
4542
with:
4643
repoToken: '${{ secrets.GITHUB_TOKEN }}'
4744
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_DART_SPECIFICATION }}'

0 commit comments

Comments
 (0)