|
| 1 | +name: validate |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + [ |
| 6 | + '+([0-9])?(.{+([0-9]),x}).x', |
| 7 | + 'master', |
| 8 | + 'next', |
| 9 | + 'next-major', |
| 10 | + 'beta', |
| 11 | + 'alpha', |
| 12 | + '!all-contributors/**', |
| 13 | + ] |
| 14 | + pull_request: |
| 15 | + branches-ignore: ['all-contributors/**'] |
| 16 | +jobs: |
| 17 | + main: |
| 18 | + strategy: |
| 19 | + matrix: |
| 20 | + node: [10.13, 12, 14, 15] |
| 21 | + runs-on: ubuntu-latest |
| 22 | + steps: |
| 23 | + - name: ⬇️ Checkout repo |
| 24 | + uses: actions/checkout@v2 |
| 25 | + |
| 26 | + - name: ⎔ Setup node |
| 27 | + uses: actions/setup-node@v1 |
| 28 | + with: |
| 29 | + node-version: ${{ matrix.node }} |
| 30 | + |
| 31 | + - name: 📥 Download deps |
| 32 | + uses: bahmutov/npm-install@v1 |
| 33 | + with: |
| 34 | + useLockFile: false |
| 35 | + |
| 36 | + - name: ▶️ Run validate script |
| 37 | + run: npm run validate |
| 38 | + |
| 39 | + - name: ⬆️ Upload coverage report |
| 40 | + uses: codecov/codecov-action@v1 |
| 41 | + |
| 42 | + release: |
| 43 | + needs: main |
| 44 | + runs-on: ubuntu-latest |
| 45 | + if: |
| 46 | + ${{ github.repository == 'testing-library/vue-testing-library' && |
| 47 | + contains('refs/heads/master,refs/heads/beta,refs/heads/next,refs/heads/alpha', |
| 48 | + github.ref) && github.event_name == 'push' }} |
| 49 | + steps: |
| 50 | + - name: ⬇️ Checkout repo |
| 51 | + uses: actions/checkout@v2 |
| 52 | + |
| 53 | + - name: ⎔ Setup node |
| 54 | + uses: actions/setup-node@v1 |
| 55 | + with: |
| 56 | + node-version: 14 |
| 57 | + |
| 58 | + - name: 📥 Download deps |
| 59 | + uses: bahmutov/npm-install@v1 |
| 60 | + with: |
| 61 | + useLockFile: false |
| 62 | + |
| 63 | + - name: 🏗 Run build script |
| 64 | + run: npm run build |
| 65 | + |
| 66 | + - name: 🚀 Release |
| 67 | + uses: cycjimmy/semantic-release-action@v2 |
| 68 | + with: |
| 69 | + semantic_version: 17 |
| 70 | + branches: | |
| 71 | + [ |
| 72 | + '+([0-9])?(.{+([0-9]),x}).x', |
| 73 | + 'master', |
| 74 | + 'next', |
| 75 | + 'next-major', |
| 76 | + {name: 'beta', prerelease: true}, |
| 77 | + {name: 'alpha', prerelease: true} |
| 78 | + ] |
| 79 | + env: |
| 80 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 81 | + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
0 commit comments