|
| 1 | +env: |
| 2 | + IMPORT_TEXT: import * as pageDetect from |
| 3 | + NPM_MODULE_NAME: github-url-detection |
| 4 | + |
| 5 | +# DO NOT EDIT BELOW - use `npx ghat fregante/ghatemplates/esm-lint --exclude jobs.Snowpack` |
| 6 | + |
| 7 | +name: ESM |
| 8 | +on: |
| 9 | + pull_request: |
| 10 | + branches: |
| 11 | + - '*' |
| 12 | + push: |
| 13 | + branches: |
| 14 | + - master |
| 15 | +jobs: |
| 16 | + Pack: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v2 |
| 20 | + - run: npm install |
| 21 | + - run: npm run build --if-present |
| 22 | + - run: npm pack --dry-run |
| 23 | + - run: npm pack --silent 2>/dev/null | xargs cat | tar -xz |
| 24 | + - uses: actions/upload-artifact@v2 |
| 25 | + with: |
| 26 | + path: package |
| 27 | + Webpack: |
| 28 | + runs-on: ubuntu-latest |
| 29 | + needs: Pack |
| 30 | + steps: |
| 31 | + - uses: actions/download-artifact@v2 |
| 32 | + - run: npm install ./artifact |
| 33 | + - run: 'echo "${{ env.IMPORT_TEXT }} ''${{ env.NPM_MODULE_NAME }}''" > index.js' |
| 34 | + - run: webpack ./index.js |
| 35 | + - run: cat dist/main.js |
| 36 | + Parcel: |
| 37 | + runs-on: ubuntu-latest |
| 38 | + needs: Pack |
| 39 | + steps: |
| 40 | + - uses: actions/download-artifact@v2 |
| 41 | + - run: npm install ./artifact |
| 42 | + - run: 'echo "${{ env.IMPORT_TEXT }} ''${{ env.NPM_MODULE_NAME }}''" > index.js' |
| 43 | + - run: npx parcel@1 build index.js |
| 44 | + - run: cat dist/index.js |
| 45 | + Rollup: |
| 46 | + runs-on: ubuntu-latest |
| 47 | + needs: Pack |
| 48 | + steps: |
| 49 | + - uses: actions/download-artifact@v2 |
| 50 | + - run: npm install ./artifact rollup@2 @rollup/plugin-node-resolve |
| 51 | + - run: 'echo "${{ env.IMPORT_TEXT }} ''${{ env.NPM_MODULE_NAME }}''" > index.js' |
| 52 | + - run: npx rollup -p node-resolve index.js |
| 53 | + TypeScript: |
| 54 | + runs-on: ubuntu-latest |
| 55 | + needs: Pack |
| 56 | + steps: |
| 57 | + - uses: actions/download-artifact@v2 |
| 58 | + - run: npm install ./artifact |
| 59 | + - run: 'echo "${{ env.IMPORT_TEXT }} ''${{ env.NPM_MODULE_NAME }}''" > index.ts' |
| 60 | + - run: tsc index.ts |
| 61 | + - run: cat index.js |
| 62 | + Node: |
| 63 | + runs-on: ubuntu-latest |
| 64 | + needs: Pack |
| 65 | + steps: |
| 66 | + - uses: actions/download-artifact@v2 |
| 67 | + - uses: actions/setup-node@v1 |
| 68 | + with: |
| 69 | + node-version: 13.x |
| 70 | + - run: 'echo "${{ env.IMPORT_TEXT }} ''${{ env.NPM_MODULE_NAME }}''" > index.mjs' |
| 71 | + - run: npm install ./artifact |
| 72 | + - run: node index.mjs |
0 commit comments