chore: add core downloads to root README (#1258) #876
This file contains hidden or 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
| on: | |
| push: | |
| branches: | |
| - main | |
| name: Run Release Please | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| # Release-please creates a PR that tracks all changes | |
| steps: | |
| - uses: google-github-actions/release-please-action@v3 | |
| id: release | |
| with: | |
| command: manifest | |
| token: ${{secrets.RELEASE_PLEASE_ACTION_TOKEN}} | |
| default-branch: main | |
| signoff: "OpenFeature Bot <[email protected]>" | |
| outputs: | |
| release_created: ${{ steps.release.outputs.releases_created }} | |
| all: ${{ toJSON(steps.release.outputs) }} | |
| paths_released: ${{ steps.release.outputs.paths_released }} | |
| sbom: | |
| needs: release-please | |
| runs-on: ubuntu-latest | |
| if: ${{ fromJSON(needs.release-please.outputs.paths_released)[0] != null }} | |
| # Continues with the release process even if SBOM generation fails. | |
| continue-on-error: true | |
| permissions: | |
| id-token: write | |
| attestations: write | |
| contents: read | |
| strategy: | |
| matrix: | |
| release: ${{ fromJSON(needs.release-please.outputs.paths_released) }} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Update npm to >=11.5.1 (for OIDC support) | |
| run: npm install -g npm@^11.5.1 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Generate SBOM | |
| run: npm sbom --sbom-format=cyclonedx --omit=dev --omit=peer --workspace=${{ matrix.release }} > sbom.json | |
| - name: Attest SBOM | |
| uses: actions/attest-sbom@v3 | |
| with: | |
| subject-path: ${{ matrix.release }}/package.json | |
| sbom-path: ./sbom.json | |
| npm-release: | |
| needs: release-please | |
| runs-on: ubuntu-latest | |
| if: ${{ needs.release-please.outputs.release_created }} | |
| environment: publish | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| # The logic below handles the npm publication: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ".nvmrc" | |
| registry-url: "https://registry.npmjs.org" | |
| cache: "npm" | |
| - name: Update npm (for OIDC auth) | |
| run: npm install -g npm@^11.5.1 | |
| - name: Build Packages | |
| run: | | |
| npm ci | |
| npm run build | |
| # need to publish all unpublished versions to NPM here | |
| # Our scripts only publish versions that do not already exist. | |
| - name: Publish to NPM | |
| env: | |
| # https://docs.npmjs.com/generating-provenance-statements | |
| NPM_CONFIG_PROVENANCE: true | |
| run: npm run publish-all | |
| - name: Build Docs | |
| run: npm run docs | |
| - name: Deploy Documentation 🚀 | |
| uses: JamesIves/github-pages-deploy-action@releases/v3 | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| BRANCH: gh-pages | |
| FOLDER: typedoc |