|
| 1 | +# https://github.com/parse-community/parse-server/blob/alpha/.github/workflows/ci.yml |
| 2 | + |
| 3 | +name: Release |
| 4 | + |
| 5 | +on: |
| 6 | + push: |
| 7 | + branches: [ main, next, next-major, beta, alpha, 'release-[0-9]+.x.x', release ] |
| 8 | + pull_request: |
| 9 | + branches: '*' |
| 10 | + paths-ignore: |
| 11 | + - '**/**.md' |
| 12 | + |
| 13 | +jobs: |
| 14 | + check-code-analysis: |
| 15 | + name: Code Analysis 👀 |
| 16 | + runs-on: ubuntu-latest |
| 17 | + permissions: |
| 18 | + actions: read |
| 19 | + contents: read |
| 20 | + security-events: write |
| 21 | + strategy: |
| 22 | + fail-fast: false |
| 23 | + matrix: |
| 24 | + language: [ 'javascript' ] |
| 25 | + steps: |
| 26 | + - name: Checkout repository |
| 27 | + uses: actions/checkout@v3 |
| 28 | + - name: Initialize CodeQL |
| 29 | + uses: github/codeql-action/init@v2 |
| 30 | + with: |
| 31 | + languages: ${{ matrix.language }} |
| 32 | + source-root: src |
| 33 | + - name: Perform CodeQL Analysis |
| 34 | + uses: github/codeql-action/analyze@v2 |
| 35 | + |
| 36 | + check-lock-file-version: |
| 37 | + name: Check Yarn Lock File Version 🔒 |
| 38 | + timeout-minutes: 5 |
| 39 | + runs-on: ubuntu-latest |
| 40 | + needs: [check-code-analysis] |
| 41 | + steps: |
| 42 | + - uses: actions/checkout@v3 |
| 43 | + - name: Check JS Lockfile |
| 44 | + uses: ChromaticHQ/javascript-lockfile-check-action@v1.1.0 |
| 45 | + with: |
| 46 | + package-manager: yarn |
| 47 | + # working-directory: web/themes/custom/my-custom-theme |
| 48 | + |
| 49 | + quality: |
| 50 | + name: Quality 🐳 |
| 51 | + runs-on: ${{ matrix.os }} |
| 52 | + needs: [check-code-analysis,check-lock-file-version] |
| 53 | + strategy: |
| 54 | + matrix: |
| 55 | + # node-version: [10.x, 12.x, 14.x, 15.x] |
| 56 | + node-version: [16.x] |
| 57 | + # os: [ubuntu-latest, windows-latest] |
| 58 | + os: [ubuntu-latest] |
| 59 | + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ |
| 60 | + steps: |
| 61 | + - name: Checkout |
| 62 | + uses: actions/checkout@v3 |
| 63 | + - uses: mskelton/setup-yarn@v1 |
| 64 | + - name: Install dependencies |
| 65 | + run: yarn --frozen-lockfile |
| 66 | + # - run: yarn test |
| 67 | + |
| 68 | + publish: |
| 69 | + name: Publish 🚀 |
| 70 | + runs-on: ubuntu-latest |
| 71 | + # if: ${{ github.ref == 'refs/heads/main' }} |
| 72 | + needs: [quality,check-code-analysis,check-lock-file-version] |
| 73 | + permissions: |
| 74 | + contents: write # to be able to publish a GitHub release |
| 75 | + issues: write # to be able to comment on released issues |
| 76 | + pull-requests: write # to be able to comment on released pull requests |
| 77 | + id-token: write # to enable use of OIDC for npm provenance |
| 78 | + steps: |
| 79 | + - name: Checkout |
| 80 | + uses: actions/checkout@v3 |
| 81 | + with: |
| 82 | + fetch-depth: 0 |
| 83 | + - name: Setup yarn |
| 84 | + uses: mskelton/setup-yarn@v1 |
| 85 | + - name: Install dependencies |
| 86 | + run: yarn --frozen-lockfile |
| 87 | + - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies |
| 88 | + run: npm audit signatures |
| 89 | + - name: Release |
| 90 | + run: yarn semantic-release |
| 91 | + env: |
| 92 | + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 93 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments