|
1 | | -name: Publish to W3C TR space |
| 1 | +name: Validate/Publish to W3C TR space |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | 5 | branches: [ main ] |
6 | 6 | paths: [ .github/**, document/** ] |
| 7 | + pull_request: |
| 8 | + paths: [ .github/**, document/** ] |
7 | 9 |
|
8 | 10 | # Allows you to run this workflow manually from the Actions tab, gh CLI tool, |
9 | 11 | # or REST API. THe w3c-status options correspond to the valid options for |
|
23 | 25 | - CRD |
24 | 26 | - CR |
25 | 27 |
|
| 28 | +env: |
| 29 | + YARN_ENABLE_IMMUTABLE_INSTALLS: false |
| 30 | + W3C_STATUS: ${{ github.event_name == 'workflow_dispatch' && inputs.w3c-status || 'WD' }} |
| 31 | + |
26 | 32 | jobs: |
27 | 33 | publish-to-w3c-TR: |
28 | | - if: github.repository == 'WebAssembly/spec' |
| 34 | + strategy: |
| 35 | + fail-fast: false |
| 36 | + matrix: |
| 37 | + spec: [core, js-api, web-api] |
29 | 38 | runs-on: ubuntu-latest |
30 | 39 | steps: |
31 | 40 | - name: Checkout repo |
32 | | - uses: actions/checkout@v2 |
| 41 | + uses: actions/checkout@v4 |
33 | 42 | with: |
34 | 43 | submodules: "recursive" |
35 | 44 | - name: Setup Node.js |
36 | | - uses: actions/setup-node@v3 |
| 45 | + uses: actions/setup-node@v4 |
37 | 46 | with: |
38 | 47 | node-version: 16 |
39 | 48 | - name: Setup Bikeshed |
40 | 49 | run: pip install bikeshed && bikeshed update |
41 | 50 | - name: Setup TexLive |
| 51 | + if: ${{ matrix.spec == 'core' }} |
42 | 52 | run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended |
43 | 53 | - name: Setup Sphinx |
| 54 | + if: ${{ matrix.spec == 'core' }} |
44 | 55 | run: pip install six && pip install sphinx==5.1.0 |
45 | | - - name: Publish all specs to their https://www.w3.org/TR/ URLs |
46 | | - run: cd document && make -e WD-echidna-CI |
| 56 | + - name: Publish ${{ matrix.spec }} spec to its https://www.w3.org/TR/ URL |
| 57 | + if: env.W3C_ECHIDNA_TOKEN_CORE |
| 58 | + run: cd document && make -e -C ${{ matrix.spec }} WD-echidna-CI |
47 | 59 | env: |
48 | | - W3C_STATUS: ${{ github.event_name == 'push' && 'CRD' || inputs.w3c-status }} |
49 | 60 | W3C_ECHIDNA_TOKEN_CORE: ${{ secrets.W3C_ECHIDNA_TOKEN_CORE }} |
50 | 61 | W3C_ECHIDNA_TOKEN_JSAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_JSAPI }} |
51 | 62 | W3C_ECHIDNA_TOKEN_WEBAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_WEBAPI }} |
52 | | - YARN_ENABLE_IMMUTABLE_INSTALLS: false |
| 63 | + ECHIDNA_DRYRUN: ${{ !(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main') }} |
| 64 | + - name: Validate ${{ matrix.spec }} spec with Echidna |
| 65 | + if: env.W3C_USERNAME |
| 66 | + run: cd document && make -e -C ${{ matrix.spec }} WD-echidna |
| 67 | + env: |
| 68 | + W3C_USERNAME: ${{ secrets.W3C_USERNAME }} |
| 69 | + W3C_PASSWORD: ${{ secrets.W3C_PASSWORD }} |
0 commit comments