mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
Enable trusted publishing
This commit is contained in:
@@ -8,9 +8,6 @@ inputs:
|
|||||||
github_token:
|
github_token:
|
||||||
description: 'Github token'
|
description: 'Github token'
|
||||||
required: true
|
required: true
|
||||||
npm_registry_token:
|
|
||||||
description: 'NPM registry token'
|
|
||||||
required: true
|
|
||||||
npm_tag:
|
npm_tag:
|
||||||
description: 'NPM tag'
|
description: 'NPM tag'
|
||||||
required: true
|
required: true
|
||||||
@@ -29,9 +26,11 @@ runs:
|
|||||||
|
|
||||||
- name: Build Libraries
|
- name: Build Libraries
|
||||||
shell: bash
|
shell: bash
|
||||||
run: npm ci && npx nx run-many --target=build
|
run: |
|
||||||
|
npm ci
|
||||||
|
npm run ci:build:many
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v6
|
||||||
name: setup GH registry
|
name: setup GH registry
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
@@ -46,7 +45,7 @@ runs:
|
|||||||
TAG: ${{ inputs.npm_tag }}
|
TAG: ${{ inputs.npm_tag }}
|
||||||
DRY_RUN: ${{ inputs.dry-run }}
|
DRY_RUN: ${{ inputs.dry-run }}
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v6
|
||||||
name: setup NPM registry
|
name: setup NPM registry
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
@@ -57,6 +56,5 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: ${{ github.action_path }}/npm-publish.sh "$TAG" "$DRY_RUN"
|
run: ${{ github.action_path }}/npm-publish.sh "$TAG" "$DRY_RUN"
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ inputs.npm_registry_token }}
|
|
||||||
TAG: ${{ inputs.npm_tag }}
|
TAG: ${{ inputs.npm_tag }}
|
||||||
DRY_RUN: ${{ inputs.dry-run }}
|
DRY_RUN: ${{ inputs.dry-run }}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../../.." && pwd )"
|
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../../.." && pwd )"
|
||||||
DIST_DIR="$ROOT_DIR/dist/@alfresco"
|
DIST_DIR="$ROOT_DIR/dist/@alfresco"
|
||||||
TAG=$1
|
TAG=$1
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ on:
|
|||||||
- master
|
- master
|
||||||
- develop
|
- develop
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
id-token: write # Required for OIDC
|
||||||
|
contents: read
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BASE_URL: ${{ secrets.PIPELINE_ENV_URL }}
|
BASE_URL: ${{ secrets.PIPELINE_ENV_URL }}
|
||||||
ADMIN_EMAIL: ${{ secrets.PIPELINE_ADMIN_USERNAME }}
|
ADMIN_EMAIL: ${{ secrets.PIPELINE_ADMIN_USERNAME }}
|
||||||
@@ -52,12 +56,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: node
|
- name: node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
@@ -78,12 +82,12 @@ jobs:
|
|||||||
- name: "aca-shared"
|
- name: "aca-shared"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: node
|
- name: node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
@@ -102,11 +106,11 @@ jobs:
|
|||||||
run: exit 1
|
run: exit 1
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
@@ -139,11 +143,11 @@ jobs:
|
|||||||
run: exit 1
|
run: exit 1
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
@@ -176,18 +180,18 @@ jobs:
|
|||||||
run: exit 1
|
run: exit 1
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
npm_tag: ${{ inputs.npm-tag }}
|
npm_tag: ${{ inputs.npm-tag }}
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.24.1
|
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@3768f40c71f5f9b0c4e6a507c8f87ed40d9b60c9 #v12.9.0
|
||||||
with:
|
with:
|
||||||
username: ${{ vars.BOT_GITHUB_USERNAME }}
|
username: ${{ vars.BOT_GITHUB_USERNAME }}
|
||||||
email: ${{ vars.BOT_GITHUB_EMAIL }}
|
email: ${{ vars.BOT_GITHUB_EMAIL }}
|
||||||
@@ -205,6 +209,8 @@ jobs:
|
|||||||
name: "Publish libs to NPM and GitHub registry"
|
name: "Publish libs to NPM and GitHub registry"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
|
id-token: write # Required for OIDC
|
||||||
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
steps:
|
steps:
|
||||||
- name: Check previous jobs status
|
- name: Check previous jobs status
|
||||||
@@ -212,12 +218,12 @@ jobs:
|
|||||||
run: exit 1
|
run: exit 1
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
@@ -230,8 +236,7 @@ jobs:
|
|||||||
uses: ./.github/actions/publish-libs
|
uses: ./.github/actions/publish-libs
|
||||||
with:
|
with:
|
||||||
branch_name: ${{ env.BRANCH_NAME }}
|
branch_name: ${{ env.BRANCH_NAME }}
|
||||||
github_token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
npm_registry_token: ${{ secrets.NPM_REGISTRY_TOKEN }}
|
|
||||||
npm_tag: ${{ env.TAG_NPM }}
|
npm_tag: ${{ env.TAG_NPM }}
|
||||||
dry-run: ${{ inputs.dry-run-release }}
|
dry-run: ${{ inputs.dry-run-release }}
|
||||||
|
|
||||||
@@ -245,10 +250,10 @@ jobs:
|
|||||||
actions: read
|
actions: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Push Source Files to Crowdin
|
- name: Push Source Files to Crowdin
|
||||||
uses: crowdin/github-action@297234bae049541aa48ed268e5de00dee4efa4b4 # v2.8.0
|
uses: crowdin/github-action@b4b468cffefb50bdd99dd83e5d2eaeb63c880380 # v2.14.0
|
||||||
with:
|
with:
|
||||||
upload_sources: true
|
upload_sources: true
|
||||||
upload_sources_args: --delete-obsolete
|
upload_sources_args: --delete-obsolete
|
||||||
|
|||||||
Reference in New Issue
Block a user