mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
Release 8.0.3 - Fix PNG signature images in PDF viewer
This commit is contained in:
@@ -9,18 +9,17 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Before install
|
|
||||||
if: ${{ ! env.ACT }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
pip install --user --quiet awscli
|
|
||||||
|
|
||||||
- name: base vars
|
- name: base vars
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
if [ -n "${GITHUB_BASE_REF:-}" ]; then
|
||||||
|
BASE_HASH=$(git merge-base "origin/${GITHUB_BASE_REF}" HEAD 2>/dev/null || git rev-parse HEAD)
|
||||||
|
else
|
||||||
|
BASE_HASH=$(git rev-parse HEAD)
|
||||||
|
fi
|
||||||
{
|
{
|
||||||
echo "GIT_HASH=$(git rev-parse HEAD)";
|
echo "GIT_HASH=$(git rev-parse HEAD)";
|
||||||
echo "BASE_HASH=$(git merge-base origin/${GITHUB_BASE_REF} HEAD)";
|
echo "BASE_HASH=${BASE_HASH}";
|
||||||
echo "HEAD_HASH=HEAD";
|
echo "HEAD_HASH=HEAD";
|
||||||
echo "HEAD_COMMIT_HASH=${GH_COMMIT}";
|
echo "HEAD_COMMIT_HASH=${GH_COMMIT}";
|
||||||
echo "NX_CALCULATION_FLAGS=--all";
|
echo "NX_CALCULATION_FLAGS=--all";
|
||||||
@@ -31,10 +30,22 @@ runs:
|
|||||||
|
|
||||||
- name: affected:* flag parser
|
- name: affected:* flag parser
|
||||||
shell: bash
|
shell: bash
|
||||||
if: ${{ contains(github.event.head_commit.message , '[affected:*]') }}
|
env:
|
||||||
|
EVENT_NAME: ${{ github.event_name }}
|
||||||
|
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||||
run: |
|
run: |
|
||||||
echo "Setting up CI to run with commit flag [affected:*] flag."
|
# Get commit message safely from git to avoid script injection
|
||||||
echo "BREAK_ACTION=true" >> $GITHUB_ENV
|
# For PRs, use the PR head SHA; for other events use HEAD
|
||||||
|
if [ "$EVENT_NAME" == "pull_request" ] && [ -n "$PR_HEAD_SHA" ]; then
|
||||||
|
COMMIT_MSG=$(git log -1 --format=%B "$PR_HEAD_SHA" 2>/dev/null || echo "")
|
||||||
|
else
|
||||||
|
COMMIT_MSG=$(git log -1 --format=%B 2>/dev/null || echo "")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if echo "$COMMIT_MSG" | grep -qF "[affected:*]"; then
|
||||||
|
echo "Setting up CI to run with commit flag [affected:*] flag."
|
||||||
|
echo "BREAK_ACTION=true" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
- name: PULL_REQUEST event
|
- name: PULL_REQUEST event
|
||||||
if: ${{ env.BREAK_ACTION == false && github.event_name == 'pull_request' && !github.event.pull_request.merged }}
|
if: ${{ env.BREAK_ACTION == false && github.event_name == 'pull_request' && !github.event.pull_request.merged }}
|
||||||
@@ -49,13 +60,15 @@ runs:
|
|||||||
} >> $GITHUB_ENV
|
} >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: RELEASE on master/develop patch branch
|
- name: RELEASE on master/develop patch branch
|
||||||
if: ${{ env.BREAK_ACTION == false && github.event.pull_request.merged }}
|
if: ${{ env.BREAK_ACTION == false && (github.event.pull_request.merged || github.event_name == 'push') }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
env:
|
||||||
|
REF_NAME: ${{ github.ref_name }}
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ github.ref_name }}" =~ ^master(-patch.*)?$ ]]; then
|
if [[ "$REF_NAME" =~ ^master(-patch.*)?$ ]]; then
|
||||||
# into master(-patch*)
|
# into master(-patch*)
|
||||||
echo "Setting up CI flags for Push on master patch"
|
echo "Setting up CI flags for Push on master patch"
|
||||||
elif [[ "${{ github.ref_name }}" =~ ^develop-patch.*$ ]]; then
|
elif [[ "$REF_NAME" =~ ^develop-patch.*$ ]]; then
|
||||||
# into develop-patch*
|
# into develop-patch*
|
||||||
echo "Setting up CI flags for Push develop patch"
|
echo "Setting up CI flags for Push develop patch"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||||
name: Create git tag
|
name: Create git tag
|
||||||
env:
|
env:
|
||||||
TAG_NAME: ${{ inputs.tagName }}
|
TAG_NAME: ${{ inputs.tagName }}
|
||||||
|
|||||||
@@ -2,36 +2,44 @@ name: "set npm tag"
|
|||||||
description: "se NPM tag"
|
description: "se NPM tag"
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
event_name:
|
|
||||||
description: "override github.event_name"
|
|
||||||
required: false
|
|
||||||
default: ${{ github.event_name }}
|
|
||||||
branch_name:
|
branch_name:
|
||||||
description: "override GITHUB_REF_NAME"
|
description: "override GITHUB_REF_NAME"
|
||||||
required: false
|
required: false
|
||||||
default: $GITHUB_REF_NAME
|
default: ${{ github.ref_name }}
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
npm-tag:
|
||||||
|
description: "NPM tag"
|
||||||
|
value: ${{ steps.set-npm-tag.outputs.npm-tag }}
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: set TAG_NPM
|
- name: set TAG_NPM
|
||||||
|
id: set-npm-tag
|
||||||
shell: bash
|
shell: bash
|
||||||
|
env:
|
||||||
|
BRANCH_NAME: ${{ inputs.branch_name }}
|
||||||
run: |
|
run: |
|
||||||
TAG_NPM="alpha"
|
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
|
||||||
VERSION_IN_PACKAGE_JSON=$(node -p "require('./package.json')".version)
|
TAG_NPM="branch"
|
||||||
echo "version in package.json=${VERSION_IN_PACKAGE_JSON}"
|
else
|
||||||
if [[ ${{ inputs.branch_name }} =~ ^master(-patch.*)?$ ]]; then
|
TAG_NPM="alpha"
|
||||||
# Pre-release versions
|
VERSION_IN_PACKAGE_JSON=$(node -p "require('./package.json')".version)
|
||||||
if [[ $VERSION_IN_PACKAGE_JSON =~ ^[0-9]*\.[0-9]*\.[0-9]*-A\.[0-9]*$ ]];
|
echo "version in package.json=${VERSION_IN_PACKAGE_JSON}"
|
||||||
then
|
if [[ $BRANCH_NAME =~ ^master(-patch.*)?$ ]]; then
|
||||||
TAG_NPM=next
|
# Pre-release versions
|
||||||
# Stable major versions
|
if [[ $VERSION_IN_PACKAGE_JSON =~ ^[0-9]*\.[0-9]*\.[0-9]*-A\.[0-9]*$ ]]; then
|
||||||
else
|
TAG_NPM=next
|
||||||
TAG_NPM=latest
|
# Stable major versions
|
||||||
fi
|
else
|
||||||
|
TAG_NPM=latest
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ $BRANCH_NAME =~ ^develop(-patch.*)?$ ]]; then
|
||||||
|
TAG_NPM=alpha
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ ${{ inputs.branch_name }} =~ ^develop(-patch.*)?$ ]]; then
|
echo "npm-tag=$TAG_NPM" >> $GITHUB_OUTPUT
|
||||||
TAG_NPM=alpha
|
echo "Computed tag: $TAG_NPM"
|
||||||
fi
|
|
||||||
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV
|
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
name: 'Setup'
|
name: 'Setup'
|
||||||
description: 'Initialize cache, env var load'
|
description: 'Initialize cache, env var load'
|
||||||
inputs:
|
inputs:
|
||||||
enable-cache:
|
cache-suffix:
|
||||||
description: 'enable caching'
|
description: 'Suffix to make Nx cache key unique per job (e.g. matrix project name)'
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
default: 'default'
|
||||||
default: 'true'
|
full-setup:
|
||||||
enable-node-modules-cache:
|
description: 'Run git-latest-tag, npm-tag, and before-install (requires fetch-depth: 0). Set to false for matrix jobs that only need node/cache.'
|
||||||
description: 'enable caching for node modules'
|
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: 'true'
|
default: 'true'
|
||||||
@@ -16,43 +15,50 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: 'false'
|
default: 'false'
|
||||||
|
outputs:
|
||||||
|
npm-tag:
|
||||||
|
description: 'NPM tag'
|
||||||
|
value: ${{ steps.set-npm-tag.outputs.npm-tag }}
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: install NPM
|
- name: Set consistent machine ID for Nx cache
|
||||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
shell: bash
|
||||||
|
run: echo "nx-github-actions" | sudo tee /etc/machine-id > /dev/null
|
||||||
|
- name: Setup pnpm
|
||||||
|
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
cache-dependency-path: package-lock.json
|
cache: 'pnpm'
|
||||||
- name: get latest tag sha
|
- name: get latest tag sha
|
||||||
|
if: ${{ inputs.full-setup == 'true' }}
|
||||||
id: tag-sha
|
id: tag-sha
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/git-latest-tag@691c1d16c90c88a92d2438a001acdefc0efa7d2a # v8.26.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/git-latest-tag@98bcfbe06aafffdc0e9a790f352602316f82303b # v18.23.0
|
||||||
# CACHE
|
- name: load "NPM TAG"
|
||||||
- name: Node Modules cache
|
if: ${{ inputs.full-setup == 'true' }}
|
||||||
id: node-modules-cache
|
id: set-npm-tag
|
||||||
if: ${{ inputs.enable-node-modules-cache == 'true' }}
|
uses: ./.github/actions/set-npm-tag
|
||||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
|
- name: Install dependencies
|
||||||
env:
|
shell: bash
|
||||||
cache-name: node-modules-cache
|
run: pnpm install --frozen-lockfile
|
||||||
|
- name: Security audit
|
||||||
|
shell: bash
|
||||||
|
run: pnpm audit --audit-level=critical
|
||||||
|
- name: Restore nx cache
|
||||||
|
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
node_modules
|
nxcache
|
||||||
key: .npm-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
.nx
|
||||||
|
dist
|
||||||
|
key: ${{ runner.os }}-nxcache-${{ inputs.cache-suffix }}-${{ hashFiles('nx.json') }}-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
node_modules-${{ runner.os }}-build-${{ env.cache-name }}-
|
${{ runner.os }}-nxcache-${{ inputs.cache-suffix }}-${{ hashFiles('nx.json') }}-
|
||||||
node_modules-${{ runner.os }}-build-
|
${{ runner.os }}-nxcache-${{ inputs.cache-suffix }}-
|
||||||
node_modules-${{ runner.os }}-
|
|
||||||
- name: pip cache
|
|
||||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
|
|
||||||
if: ${{ inputs.enable-cache == 'true' }}
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip-
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}
|
|
||||||
- name: load "NPM TAG"
|
|
||||||
uses: ./.github/actions/set-npm-tag
|
|
||||||
- name: before install script
|
- name: before install script
|
||||||
|
if: ${{ inputs.full-setup == 'true' }}
|
||||||
uses: ./.github/actions/before-install
|
uses: ./.github/actions/before-install
|
||||||
with:
|
with:
|
||||||
act: ${{ inputs.act }}
|
act: ${{ inputs.act }}
|
||||||
|
|||||||
@@ -0,0 +1,134 @@
|
|||||||
|
name: Release lib on branch
|
||||||
|
run-name: Release lib on branch ${{ github.ref_name }}
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
dry-run-flag:
|
||||||
|
description: 'enable dry-run on artifact push'
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
npm-tag:
|
||||||
|
description: 'NPM tag to use for publishing'
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: 'branch'
|
||||||
|
|
||||||
|
env:
|
||||||
|
BASE_REF: ${{ github.base_ref }}
|
||||||
|
HEAD_REF: ${{ github.head_ref }}
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
GITHUB_BRANCH: ${{ github.ref_name }}
|
||||||
|
GH_BUILD_DIR: ${{ github.workspace }}
|
||||||
|
GH_COMMIT: ${{ github.sha }}
|
||||||
|
BUILD_ID: ${{ github.run_id }}
|
||||||
|
GH_RUN_NUMBER: ${{ github.run_attempt }}
|
||||||
|
GH_BUILD_NUMBER: ${{ github.run_id }}
|
||||||
|
JOB_ID: ${{ github.run_id }}
|
||||||
|
LOG_LEVEL: "ERROR"
|
||||||
|
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
|
||||||
|
NODE_OPTIONS: "--max-old-space-size=5120"
|
||||||
|
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
|
||||||
|
DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
|
||||||
|
DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
|
||||||
|
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
|
||||||
|
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||||
|
REPO_OWNER: "Alfresco"
|
||||||
|
REPO_NAME: "alfresco-ng2-components"
|
||||||
|
STORYBOOK_DIR: "./dist/storybook/stories"
|
||||||
|
BUILT_LIBS_DIR: "./dist/libs"
|
||||||
|
NODE_MODULES_DIR: "./node_modules"
|
||||||
|
REDIRECT_URI: /
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
setup:
|
||||||
|
timeout-minutes: 20
|
||||||
|
name: "Setup"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: set TAG_NPM BRANCH
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
TAG_NPM=${{ inputs.npm-tag }}
|
||||||
|
echo "Set TAG with name: ${TAG_NPM}"
|
||||||
|
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: ./.github/actions/setup
|
||||||
|
with:
|
||||||
|
enable-cache: false
|
||||||
|
enable-node-modules-cache: false
|
||||||
|
- name: install
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
npx nx run js-api:bundle
|
||||||
|
npx nx run cli:bundle
|
||||||
|
- uses: ./.github/actions/upload-node-modules-and-artifacts
|
||||||
|
|
||||||
|
release-npm:
|
||||||
|
needs: [setup]
|
||||||
|
timeout-minutes: 30
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: ./.github/actions/setup
|
||||||
|
with:
|
||||||
|
enable-cache: false
|
||||||
|
enable-node-modules-cache: false
|
||||||
|
- id: set-dryrun
|
||||||
|
uses: ./.github/actions/enable-dryrun
|
||||||
|
with:
|
||||||
|
dry-run-flag: ${{ inputs.dry-run-flag }}
|
||||||
|
- uses: ./.github/actions/download-node-modules-and-artifacts
|
||||||
|
- name: Set libraries versions
|
||||||
|
if: ${{ inputs.npm-tag == 'branch' }}
|
||||||
|
run: |
|
||||||
|
set -u;
|
||||||
|
./scripts/update-version.sh -gnu || exit 1;
|
||||||
|
- name: Set migrations
|
||||||
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const setMigrations = require('./scripts/github/release/set-migrations.js');
|
||||||
|
setMigrations();
|
||||||
|
- name: Build libraries
|
||||||
|
run: |
|
||||||
|
npx nx run-many --target=build --prod --skip-nx-cache
|
||||||
|
npx nx run-many --target=build-schematics
|
||||||
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
|
name: release libraries GH registry
|
||||||
|
with:
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
registry-url: 'https://npm.pkg.github.com'
|
||||||
|
scope: '@alfresco'
|
||||||
|
- run: npx nx run-many --target=npm-publish --tag=branch|| exit 1
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.PAT_WRITE_PKG }}
|
||||||
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
|
name: release libraries Npm registry
|
||||||
|
with:
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
registry-url: 'https://${{ vars.NPM_REGISTRY_ADDRESS }}'
|
||||||
|
scope: '@alfresco'
|
||||||
|
- run: npx nx run-many --target=npm-publish --tag=branch || exit 1
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
npm-check-bundle:
|
||||||
|
needs: [release-npm]
|
||||||
|
timeout-minutes: 15
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
- uses: ./.github/actions/npm-check-bundle
|
||||||
+104
-60
@@ -1,5 +1,4 @@
|
|||||||
name: Release lib on branch
|
name: "release"
|
||||||
run-name: Release lib on branch ${{ github.ref_name }}
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -9,126 +8,171 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
npm-tag:
|
push:
|
||||||
description: 'NPM tag to use for publishing'
|
branches:
|
||||||
required: false
|
- develop
|
||||||
type: string
|
- develop-patch*
|
||||||
default: 'branch'
|
- master
|
||||||
|
- master-patch-*
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
id-token: write # Required for OIDC
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BASE_REF: ${{ github.base_ref }}
|
|
||||||
HEAD_REF: ${{ github.head_ref }}
|
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
||||||
GITHUB_BRANCH: ${{ github.ref_name }}
|
|
||||||
GH_BUILD_DIR: ${{ github.workspace }}
|
|
||||||
GH_COMMIT: ${{ github.sha }}
|
GH_COMMIT: ${{ github.sha }}
|
||||||
BUILD_ID: ${{ github.run_id }}
|
|
||||||
GH_RUN_NUMBER: ${{ github.run_attempt }}
|
|
||||||
GH_BUILD_NUMBER: ${{ github.run_id }}
|
GH_BUILD_NUMBER: ${{ github.run_id }}
|
||||||
JOB_ID: ${{ github.run_id }}
|
|
||||||
LOG_LEVEL: "ERROR"
|
LOG_LEVEL: "ERROR"
|
||||||
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
|
|
||||||
NODE_OPTIONS: "--max-old-space-size=5120"
|
NODE_OPTIONS: "--max-old-space-size=5120"
|
||||||
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
|
|
||||||
DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
|
|
||||||
DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
|
|
||||||
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
|
|
||||||
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
|
||||||
REPO_OWNER: "Alfresco"
|
|
||||||
REPO_NAME: "alfresco-ng2-components"
|
|
||||||
STORYBOOK_DIR: "./dist/storybook/stories"
|
|
||||||
BUILT_LIBS_DIR: "./dist/libs"
|
|
||||||
NODE_MODULES_DIR: "./node_modules"
|
|
||||||
REDIRECT_URI: /
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup:
|
setup:
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
|
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||||
name: "Setup"
|
name: "Setup"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
actions: write
|
||||||
steps:
|
steps:
|
||||||
- name: set TAG_NPM BRANCH
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
TAG_NPM=${{ inputs.npm-tag }}
|
|
||||||
echo "Set TAG with name: ${TAG_NPM}"
|
|
||||||
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
with:
|
|
||||||
enable-cache: false
|
|
||||||
enable-node-modules-cache: false
|
|
||||||
- name: install
|
- name: install
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
pnpm install --frozen-lockfile
|
||||||
npx nx run js-api:bundle
|
pnpm bundle:js-api
|
||||||
npx nx run cli:bundle
|
pnpm bundle:cli
|
||||||
- uses: ./.github/actions/upload-node-modules-and-artifacts
|
- uses: ./.github/actions/upload-node-modules-and-artifacts
|
||||||
|
|
||||||
release-npm:
|
release-npm:
|
||||||
needs: [setup]
|
needs: [setup]
|
||||||
|
outputs:
|
||||||
|
release_version: ${{ steps.set-version.outputs.release_version }}
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
|
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
|
id-token: write # Required for OIDC
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
|
actions: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: ./.github/actions/setup
|
- id: setup
|
||||||
with:
|
uses: ./.github/actions/setup
|
||||||
enable-cache: false
|
|
||||||
enable-node-modules-cache: false
|
|
||||||
- id: set-dryrun
|
- id: set-dryrun
|
||||||
uses: ./.github/actions/enable-dryrun
|
uses: ./.github/actions/enable-dryrun
|
||||||
with:
|
with:
|
||||||
dry-run-flag: ${{ inputs.dry-run-flag }}
|
dry-run-flag: ${{ inputs.dry-run-flag }}
|
||||||
- uses: ./.github/actions/download-node-modules-and-artifacts
|
- uses: ./.github/actions/download-node-modules-and-artifacts
|
||||||
- name: Set libraries versions
|
- name: Set libraries versions
|
||||||
if: ${{ inputs.npm-tag == 'branch' }}
|
id: set-version
|
||||||
run: |
|
run: |
|
||||||
set -u;
|
set -u;
|
||||||
./scripts/update-version.sh -gnu || exit 1;
|
./scripts/github/build/bumpversion.sh
|
||||||
- name: Set migrations
|
- name: Set migrations
|
||||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const setMigrations = require('./scripts/github/release/set-migrations.js');
|
const setMigrations = require('./scripts/github/release/set-migrations.js');
|
||||||
setMigrations();
|
setMigrations();
|
||||||
- name: Build libraries
|
- name: build libraries
|
||||||
run: |
|
run: |
|
||||||
npx nx run-many --target=build --prod --skip-nx-cache
|
pnpm build:libs
|
||||||
npx nx run-many --target=build-schematics
|
pnpm build:schematics
|
||||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||||
name: release libraries GH registry
|
name: release libraries GH registry
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
registry-url: 'https://npm.pkg.github.com'
|
registry-url: 'https://npm.pkg.github.com'
|
||||||
scope: '@alfresco'
|
scope: '@alfresco'
|
||||||
- run: npx nx run-many --target=npm-publish --tag=branch|| exit 1
|
- run: pnpm run publish --tag ${{ steps.setup.outputs.npm-tag }} --provenance=false ${{ steps.set-dryrun.outputs.dryrun }}
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.PAT_WRITE_PKG }}
|
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||||
name: release libraries Npm registry
|
name: release libraries Npm registry
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
registry-url: 'https://${{ vars.NPM_REGISTRY_ADDRESS }}'
|
registry-url: 'https://${{ vars.NPM_REGISTRY_ADDRESS }}'
|
||||||
scope: '@alfresco'
|
scope: '@alfresco'
|
||||||
- run: npx nx run-many --target=npm-publish --tag=branch || exit 1
|
- run: pnpm run publish --tag ${{ steps.setup.outputs.npm-tag }} ${{ steps.set-dryrun.outputs.dryrun }}
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
|
create-git-tag:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [setup, release-npm]
|
||||||
|
if: github.event_name != 'workflow_dispatch'
|
||||||
|
name: Create github tag
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
- uses: './.github/actions/create-git-tag'
|
||||||
|
with:
|
||||||
|
tagName: ${{ needs.release-npm.outputs.release_version }}
|
||||||
|
|
||||||
npm-check-bundle:
|
npm-check-bundle:
|
||||||
needs: [release-npm]
|
needs: [release-npm]
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
- uses: ./.github/actions/npm-check-bundle
|
- uses: ./.github/actions/npm-check-bundle
|
||||||
|
|
||||||
|
push-translation-keys-to-crowdin:
|
||||||
|
name: Push translations keys to Crowdin
|
||||||
|
if: github.ref_name == 'develop' && github.event_name != 'workflow_dispatch'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [setup]
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: read
|
||||||
|
actions: read
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
|
||||||
|
- name: Push Source Files to Crowdin
|
||||||
|
uses: crowdin/github-action@c7af9bc98b01694653031fef2a0dc6c7888ce9bc # v2.17.0
|
||||||
|
with:
|
||||||
|
upload_sources: true
|
||||||
|
upload_sources_args: --delete-obsolete
|
||||||
|
env:
|
||||||
|
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TRANSLATIONS_TOKEN }}
|
||||||
|
|
||||||
|
pull-translation-keys-from-crowdin:
|
||||||
|
needs: push-translation-keys-to-crowdin
|
||||||
|
name: Run Crowdin pull pipeline for up-to-date sync
|
||||||
|
uses: ./.github/workflows/pull-from-crowdin.yml
|
||||||
|
secrets:
|
||||||
|
GH_APP_ENGINEERING_CONTRIB_PRIVATE_KEY: ${{ secrets.GH_APP_ENGINEERING_CONTRIB_PRIVATE_KEY }}
|
||||||
|
CROWDIN_TRANSLATIONS_TOKEN: ${{ secrets.CROWDIN_TRANSLATIONS_TOKEN }}
|
||||||
|
HXPS_GIT_COMMIT_SIGNING_PRIVATE_KEY: ${{ secrets.HXPS_GIT_COMMIT_SIGNING_PRIVATE_KEY }}
|
||||||
|
|
||||||
|
finalize:
|
||||||
|
if: always()
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Final Results
|
||||||
|
needs: [release-npm, npm-check-bundle]
|
||||||
|
steps:
|
||||||
|
- name: Check job execution status
|
||||||
|
if: >-
|
||||||
|
${{
|
||||||
|
contains(needs.*.result, 'failure')
|
||||||
|
|| contains(needs.*.result, 'cancelled')
|
||||||
|
}}
|
||||||
|
run: exit 1
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "alfresco-ng2-components",
|
"name": "alfresco-ng2-components",
|
||||||
"description": "Alfresco Angular components",
|
"description": "Alfresco Angular components",
|
||||||
"version": "8.0.2",
|
"version": "8.0.3-A.1",
|
||||||
"author": "Hyland Software, Inc. and its affiliates",
|
"author": "Hyland Software, Inc. and its affiliates",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "husky install",
|
"prepare": "husky install",
|
||||||
|
|||||||
Reference in New Issue
Block a user