|
| 1 | +name: bevry |
| 2 | +'on': |
| 3 | + - push |
| 4 | + - pull_request |
| 5 | +jobs: |
| 6 | + test: |
| 7 | + strategy: |
| 8 | + matrix: |
| 9 | + os: |
| 10 | + - ubuntu-latest |
| 11 | + - macos-latest |
| 12 | + - windows-latest |
| 13 | + node: |
| 14 | + - '16' |
| 15 | + - '18' |
| 16 | + - '20' |
| 17 | + - '21' |
| 18 | + runs-on: ${{ matrix.os }} |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v4 |
| 21 | + - name: Install desired Node.js version |
| 22 | + uses: actions/setup-node@v4 |
| 23 | + with: |
| 24 | + node-version: '20' |
| 25 | + - name: Verify Node.js Versions |
| 26 | + run: >- |
| 27 | + printf '%s' 'node: ' && node --version && printf '%s' 'npm: ' && npm |
| 28 | + --version && node -e 'console.log(process.versions)' |
| 29 | + - run: npm run our:setup |
| 30 | + - run: npm run our:compile |
| 31 | + - run: npm run our:verify |
| 32 | + - name: Install targeted Node.js |
| 33 | + if: ${{ matrix.node != 20 }} |
| 34 | + uses: actions/setup-node@v4 |
| 35 | + with: |
| 36 | + node-version: ${{ matrix.node }} |
| 37 | + - name: Verify Node.js Versions |
| 38 | + run: >- |
| 39 | + printf '%s' 'node: ' && node --version && printf '%s' 'npm: ' && npm |
| 40 | + --version && node -e 'console.log(process.versions)' |
| 41 | + - run: npm test |
| 42 | + publish: |
| 43 | + if: ${{ github.event_name == 'push' }} |
| 44 | + needs: test |
| 45 | + runs-on: ubuntu-latest |
| 46 | + steps: |
| 47 | + - uses: actions/checkout@v4 |
| 48 | + - name: Install desired Node.js version |
| 49 | + uses: actions/setup-node@v4 |
| 50 | + with: |
| 51 | + node-version: '20' |
| 52 | + - name: Verify Node.js Versions |
| 53 | + run: >- |
| 54 | + printf '%s' 'node: ' && node --version && printf '%s' 'npm: ' && npm |
| 55 | + --version && node -e 'console.log(process.versions)' |
| 56 | + - run: npm run our:setup |
| 57 | + - run: npm run our:compile |
| 58 | + - run: npm run our:meta |
| 59 | + - name: publish to npm |
| 60 | + uses: bevry-actions/npm@v1.1.7 |
| 61 | + with: |
| 62 | + npmAuthToken: ${{ secrets.NPM_AUTH_TOKEN }} |
| 63 | + npmBranchTag: ':next' |
| 64 | + - name: publish to surge |
| 65 | + uses: bevry-actions/surge@v1.1.0 |
| 66 | + with: |
| 67 | + surgeLogin: ${{ secrets.SURGE_LOGIN }} |
| 68 | + surgeToken: ${{ secrets.SURGE_TOKEN }} |
| 69 | + automerge: |
| 70 | + permissions: |
| 71 | + contents: write |
| 72 | + pull-requests: write |
| 73 | + runs-on: ubuntu-latest |
| 74 | + if: github.actor == 'dependabot[bot]' |
| 75 | + steps: |
| 76 | + - name: Enable auto-merge for Dependabot PRs |
| 77 | + run: gh pr merge --auto --squash "$PR_URL" |
| 78 | + env: |
| 79 | + PR_URL: ${{github.event.pull_request.html_url}} |
| 80 | + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
0 commit comments