name: Release workflow run-name: Release workflow triggered from ${{ github.ref_name }} branch on: workflow_dispatch: inputs: npm-tag: description: 'NPM tag that libraries will be published with' required: false type: string default: 'branch' dry-run-release: description: 'Enable dry-run' required: false type: boolean default: false permissions: id-token: write contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: false jobs: publish-libs: name: 'Publish libs to NPM' runs-on: ubuntu-latest timeout-minutes: 45 permissions: id-token: write # Required for OIDC contents: read steps: - name: Checkout uses: actions/checkout@v6 with: fetch-depth: 0 - name: Setup node uses: actions/setup-node@v6 with: node-version-file: '.nvmrc' cache: 'npm' - name: Set library versions run: | VERSION=$(jq -cr '.version' < package.json) echo "Releasing libraries as $VERSION" bash .github/actions/update-library-versions/update-lib-versions.sh "$VERSION" "false" - name: install run: npm ci - name: build libraries run: npx nx run-many --target=build --projects=aca-content,aca-shared,aca-playwright-shared - uses: actions/setup-node@v6 name: setup NPM registry with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' scope: '@alfresco' - name: publish to NPM registry run: bash .github/actions/publish-libs/npm-publish.sh "$TAG" "$DRY_RUN" env: TAG: ${{ inputs.npm-tag }} DRY_RUN: ${{ inputs.dry-run-release }}