chore(main): release angular-sdk 0.0.7-experimental (#1091) #755
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
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 <109696520+openfeaturebot@users.noreply.github.com>" | |
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 | |
strategy: | |
matrix: | |
release: ${{ fromJSON(needs.release-please.outputs.paths_released) }} | |
env: | |
TAG: ${{ fromJSON(needs.release-please.outputs.all)[format('{0}--tag_name', matrix.release)] }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Generate SBOM | |
run: | | |
npm install -g npm@^10.2.0 | |
npm ci | |
npm sbom --sbom-format=cyclonedx --omit=dev --omit=peer --workspace=${{matrix.release}} > bom.json | |
- name: Attach SBOM to artifact | |
env: | |
GITHUB_TOKEN: ${{secrets.RELEASE_PLEASE_ACTION_TOKEN}} | |
run: | |
gh release upload $TAG bom.json | |
npm-release: | |
needs: release-please | |
runs-on: ubuntu-latest | |
if: ${{ needs.release-please.outputs.release_created }} | |
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: 18 | |
registry-url: "https://registry.npmjs.org" | |
cache: 'npm' | |
- 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: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
# 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 |