feat: Retry failed requests #233
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test & Release | |
on: [push, pull_request] | |
env: | |
CI: false | |
jobs: | |
tests: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [ '16', '18', '20' ] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'pnpm' | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm test | |
env: | |
CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }} | |
CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }} | |
CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }} | |
NETLIFY_HOST: ${{ secrets.NETLIFY_HOST }} # Used to test functionality outside of the Netlify environment | |
release: | |
name: Release | |
if: github.event_name == 'push' && github.ref_name == 'main' | |
needs: tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
cache: 'pnpm' | |
# https://github.com/pnpm/pnpm/issues/3141 | |
registry-url: 'https://registry.npmjs.org' | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm --filter netlify-plugin-cloudinary build | |
# Do not store semantic release dependencies in package.json to avoid lower node versions from failing tests | |
- run: pnpm install -w @semantic-release/changelog @semantic-release/git semantic-release | |
- run: npx semantic-release | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |