Skip to content

chore(main): release web-sdk 1.3.1 (#1069) #741

chore(main): release web-sdk 1.3.1 (#1069)

chore(main): release web-sdk 1.3.1 (#1069) #741

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
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 }}
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}}
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