forked from dotCMS/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dotCMS:master' into master
- Loading branch information
Showing
207 changed files
with
2,470 additions
and
1,178 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: 'CLI Deploy Artifacts' | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'main' | ||
- 'trunk' | ||
- 'release-*' | ||
jobs: | ||
build: | ||
uses: ./.github/workflows/cli-build-artifacts.yml | ||
with: | ||
skipTests: true | ||
buildNativeImage: false | ||
uploadArtifacts: true | ||
branch: ${{ github.ref_name }} | ||
secrets: | ||
dotcms-license: ${{ secrets.DOTCMS_LICENSE }} | ||
artifactory-repo-username: ${{ secrets.EE_REPO_USERNAME }} | ||
artifactory-repo-password: ${{ secrets.EE_REPO_PASSWORD }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: 'Publish NPM Package' | ||
on: | ||
workflow_call: | ||
inputs: | ||
ref: | ||
description: 'Ref to checkout' | ||
required: true | ||
type: string | ||
artifact-id: | ||
description: 'Artifact id' | ||
required: true | ||
type: string | ||
run-id: | ||
description: 'Run id' | ||
required: true | ||
type: number | ||
npm-package-version-tag: | ||
description: 'NPM package version tag' | ||
required: true | ||
type: string | ||
secrets: | ||
gh-pat: | ||
description: 'GitHub Personal Access Token' | ||
required: true | ||
npm-token: | ||
description: 'NPM registry token' | ||
required: false | ||
|
||
env: | ||
NODE_VERSION: 19 | ||
|
||
jobs: | ||
publish-npm-package: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout' | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
|
||
- uses: ./.github/actions/cleanup-runner | ||
|
||
- name: 'Set up Node.js' | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: 'Download all build artifacts' | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: ${{ github.workspace }}/npm-package | ||
name: ${{ inputs.artifact-id }} | ||
run-id: ${{ inputs.run-id }} | ||
github-token: ${{ secrets.gh-pat }} # token with actions:read permissions on target repo | ||
|
||
- name: 'Validate NPM package' | ||
run: | | ||
echo "::group::NPM package contents" | ||
if [ ! -f ${{ github.workspace }}/npm-package/package.json ]; then | ||
echo "::error::NPM package not found. Exiting..." | ||
exit 1 | ||
else | ||
echo "::notice::NPM package found. Proceeding..." | ||
cat ${{ github.workspace }}/npm-package/package.json | ||
fi | ||
- name: 'Publish to NPM registry' | ||
if: success() | ||
working-directory: ${{ github.workspace }}/npm-package | ||
env: | ||
NPM_AUTH_TOKEN: ${{ secrets.npm-token }} | ||
NPM_PACKAGE_VERSION_TAG: ${{ inputs.npm-package-version-tag }} | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > ~/.npmrc | ||
npm publish --access public --tag ${NPM_PACKAGE_VERSION_TAG} |
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
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
Oops, something went wrong.