-
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 pull request #68 from milaboratory/v4-merge-09-10-2024
v4-beta -> v4
- Loading branch information
Showing
22 changed files
with
1,039 additions
and
48 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -249,3 +249,4 @@ async function run(): Promise<void> { | |
} | ||
|
||
run() | ||
// loadTagVersions(200) |
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
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
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 |
---|---|---|
|
@@ -21,4 +21,3 @@ inputs: | |
runs: | ||
using: 'node20' | ||
main: 'dist/index.js' | ||
|
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 |
---|---|---|
|
@@ -136,4 +136,4 @@ runs: | |
done <<<"${PNPM_ARGS}" | ||
pnpm run ${{ inputs.test-script-name }} "${set_args[@]}" | ||
fi | ||
fi |
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,118 @@ | ||
name: Build NodeJS application | ||
author: 'MiLaboratories' | ||
description: | | ||
Prepare agent for building a NodeJS project. | ||
Install NodeJS specific version, download package, create cache e.t.c | ||
inputs: | ||
build-version: | ||
description: | | ||
Set version number in 'package.json' file to given value. | ||
required: false | ||
|
||
build-script-name: | ||
description: | | ||
Name of script for application build | ||
required: true | ||
default: 'build' | ||
|
||
node-version: | ||
description: | | ||
Node version to use. | ||
Examples: '16.x', '14.x' | ||
required: true | ||
|
||
cache-version: | ||
description: | | ||
Simple hack, that allows to 'reset' cache for particular job. | ||
Just change the value of this parameter and the next run will | ||
not find build cache and will have to start from scratch. | ||
required: false | ||
default: 'v1' | ||
|
||
hashfiles-search-path: | ||
description: | | ||
Hashfiles search path for package-lock.json | ||
required: false | ||
default: '**/package-lock.json' | ||
|
||
is-electron-application: | ||
description: | | ||
If 'true' enables cache for an Electron application, | ||
if 'false', enables cache for a generic NodeJS application. | ||
required: false | ||
default: 'false' | ||
|
||
registry-url: | ||
description: | | ||
The npm registry url to set up for auth | ||
and publication of the node js package. | ||
required: false | ||
default: 'https://npm.pkg.github.com' | ||
|
||
scope: | ||
description: | | ||
Scope for authenticating against npm registries. | ||
required: false | ||
default: ${{ format('{0}{1}', '@', github.repository_owner) }} | ||
|
||
npm-auth-token: | ||
description: | | ||
npm private registry auth token | ||
required: false | ||
|
||
always-auth: | ||
description: | | ||
Set always-auth in npmrc. | ||
required: false | ||
default: 'false' | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- name: Prepare environment for building a NodeJS application | ||
uses: milaboratory/github-ci/actions/node/prepare@v4 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
cache-version: ${{ inputs.cache-version }} | ||
hashfiles-search-path: ${{ inputs.hashfiles-search-path }} | ||
is-electron-application: ${{ inputs.is-electron-application }} | ||
registry-url: ${{ inputs.registry-url }} | ||
scope: ${{ inputs.scope }} | ||
always-auth: ${{ inputs.always-auth }} | ||
|
||
- name: Update npm to latest available version | ||
uses: milaboratory/github-ci/actions/shell@v4 | ||
with: | ||
run: | | ||
npm i -g npm@latest | ||
- name: Install NodeJS packages with npm | ||
uses: milaboratory/github-ci/actions/shell@v4 | ||
env: | ||
NODE_AUTH_TOKEN: ${{ inputs.npm-auth-token }} | ||
with: | ||
run: | | ||
npm ci | ||
- name: Patch package version | ||
uses: milaboratory/github-ci/actions/node/patch-version@v4 | ||
with: | ||
version: ${{ inputs.build-version }} | ||
|
||
- name: Run build on (Windows) | ||
if: runner.os == 'Windows' | ||
shell: pwsh | ||
run: | | ||
npm run ${{ inputs.build-script-name }} | ||
- name: Run build on (macOS and Linux) | ||
uses: milaboratory/github-ci/actions/shell@v4 | ||
if: runner.os == 'macOS' || runner.os == 'Linux' | ||
with: | ||
run: | | ||
npm run ${{ inputs.build-script-name }} |
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.