@galadrim/galadmin 0.2.11 → 0.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,41 @@
1
+ name: 'Automated Version Bump'
2
+ description: >-
3
+ Bumps the package version, commits package.json + package-lock.json,
4
+ tags the result and pushes both to the current branch.
5
+ Requires a checkout with persisted credentials and a job granting
6
+ `permissions: contents: write`.
7
+
8
+ inputs:
9
+ version-type:
10
+ description: 'SemVer release type: patch, minor or major'
11
+ required: false
12
+ default: 'patch'
13
+
14
+ outputs:
15
+ version:
16
+ description: 'The new version, without the v prefix (e.g. 0.2.12)'
17
+ value: ${{ steps.bump.outputs.version }}
18
+
19
+ runs:
20
+ using: 'composite'
21
+ steps:
22
+ - name: Configure git author
23
+ shell: bash
24
+ run: |
25
+ git config user.name "github-actions[bot]"
26
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
27
+
28
+ - name: Bump, commit and tag
29
+ id: bump
30
+ shell: bash
31
+ run: |
32
+ VERSION=$(npm version "${{ inputs.version-type }}" --no-git-tag-version)
33
+ VERSION="${VERSION#v}"
34
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
35
+ git add package.json package-lock.json
36
+ git commit -m "ci: version bump to $VERSION"
37
+ git tag "$VERSION"
38
+
39
+ - name: Push commit and tag
40
+ shell: bash
41
+ run: git push origin "HEAD:${{ github.ref_name }}" "${{ steps.bump.outputs.version }}"
@@ -0,0 +1,53 @@
1
+ name: Publish alpha
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ permissions:
7
+ contents: read
8
+
9
+ concurrency:
10
+ group: alpha-publish
11
+
12
+ jobs:
13
+ test:
14
+ uses: ./.github/workflows/ci.yml
15
+
16
+ build-and-publish-alpha:
17
+ needs: test
18
+ runs-on: ubicloud-standard-2
19
+ env:
20
+ CI: false
21
+ steps:
22
+ - name: Checkout code
23
+ uses: actions/checkout@v7
24
+ - uses: actions/setup-node@v7
25
+ with:
26
+ node-version: 22
27
+ registry-url: 'https://registry.npmjs.org'
28
+ cache: 'npm'
29
+ cache-dependency-path: |
30
+ package-lock.json
31
+ src/front/package-lock.json
32
+ - name: Compute alpha version
33
+ run: |
34
+ BASE=$(node -p "require('./package.json').version")
35
+ npm version "$BASE-alpha.${{ github.run_number }}.${{ github.run_attempt }}" --no-git-tag-version --allow-same-version
36
+ - name: Dependencies installation
37
+ run: npm ci
38
+ - name: Front-end - Dependencies installation
39
+ run: npm ci
40
+ working-directory: ./src/front
41
+ - name: Front-end - Generate build
42
+ run: npm run build
43
+ working-directory: ./src/front
44
+ - name: Generate build
45
+ run: npm run build
46
+ - name: Publish package
47
+ run: npm publish --tag alpha
48
+ env:
49
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
50
+ - name: Verify dist-tags
51
+ run: npm view @galadrim/galadmin dist-tags --json
52
+ env:
53
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -9,19 +9,18 @@ jobs:
9
9
  runs-on: ubicloud-standard-2
10
10
  steps:
11
11
  - name: Checkout code
12
- uses: actions/checkout@v2
13
- - uses: actions/setup-node@v3
12
+ uses: actions/checkout@v7
13
+ - uses: actions/setup-node@v7
14
14
  with:
15
15
  node-version: 22
16
+ cache: 'npm'
17
+ cache-dependency-path: |
18
+ package-lock.json
19
+ src/front/package-lock.json
16
20
  - name: Dependencies installation
17
- run: npm install
18
- - name: Front-end - Load cache
19
- uses: actions/cache@v4
20
- with:
21
- path: '**/src/front/node_modules'
22
- key: ${{ runner.os }}-npm-front-${{ hashFiles('**/src/front/package-lock.json') }}
21
+ run: npm ci
23
22
  - name: Front-end - Dependencies installation
24
- run: npm install
23
+ run: npm ci
25
24
  working-directory: ./src/front
26
25
  # The root tsconfig includes the custom CKEditor source under src/front.
27
26
  - name: Typecheck
@@ -11,29 +11,28 @@ jobs:
11
11
  build-and-deploy:
12
12
  needs: test
13
13
  runs-on: ubicloud-standard-2
14
+ permissions:
15
+ contents: write
14
16
  env:
15
17
  CI: false
16
18
  steps:
17
19
  - name: Checkout code
18
- uses: actions/checkout@v2
19
- - uses: actions/setup-node@v3
20
+ uses: actions/checkout@v7
21
+ - uses: actions/setup-node@v7
20
22
  with:
21
23
  node-version: 22
24
+ cache: 'npm'
25
+ cache-dependency-path: |
26
+ package-lock.json
27
+ src/front/package-lock.json
22
28
  - name: 'Automated Version Bump'
23
- uses: 'phips28/gh-action-bump-version@master'
24
- env:
25
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29
+ uses: ./.github/actions/version-bump
26
30
  with:
27
- version-type: 'patch'
31
+ version-type: 'patch'
28
32
  - name: Dependencies installation
29
- run: npm install
30
- - name: Front-end - Load cache
31
- uses: actions/cache@v4
32
- with:
33
- path: '**/src/front/node_modules'
34
- key: ${{ runner.os }}-npm-front-${{ hashFiles('**/src/front/package-lock.json') }}
33
+ run: npm ci
35
34
  - name: Front-end - Dependencies installation
36
- run: npm install
35
+ run: npm ci
37
36
  working-directory: ./src/front
38
37
  - name: Front-end - Generate build
39
38
  run: npm run build
@@ -41,6 +40,6 @@ jobs:
41
40
  - name: Generate build
42
41
  run: npm run build
43
42
  - name: Publish package
44
- uses: JS-DevTools/npm-publish@v1
43
+ uses: JS-DevTools/npm-publish@v4
45
44
  with:
46
45
  token: ${{ secrets.NPM_TOKEN }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galadrim/galadmin",
3
- "version": "0.2.11",
3
+ "version": "0.2.12",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -1,12 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -x "$basedir/node" ]; then
9
- exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
10
- else
11
- exec node "$basedir/../semver/bin/semver.js" "$@"
12
- fi
@@ -1,17 +0,0 @@
1
- @ECHO off
2
- GOTO start
3
- :find_dp0
4
- SET dp0=%~dp0
5
- EXIT /b
6
- :start
7
- SETLOCAL
8
- CALL :find_dp0
9
-
10
- IF EXIST "%dp0%\node.exe" (
11
- SET "_prog=%dp0%\node.exe"
12
- ) ELSE (
13
- SET "_prog=node"
14
- SET PATHEXT=%PATHEXT:;.JS;=;%
15
- )
16
-
17
- endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %*
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env pwsh
2
- $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
-
4
- $exe=""
5
- if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
- # Fix case when both the Windows and Linux builds of Node
7
- # are installed in the same directory
8
- $exe=".exe"
9
- }
10
- $ret=0
11
- if (Test-Path "$basedir/node$exe") {
12
- # Support pipeline input
13
- if ($MyInvocation.ExpectingInput) {
14
- $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
15
- } else {
16
- & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
17
- }
18
- $ret=$LASTEXITCODE
19
- } else {
20
- # Support pipeline input
21
- if ($MyInvocation.ExpectingInput) {
22
- $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args
23
- } else {
24
- & "node$exe" "$basedir/../semver/bin/semver.js" $args
25
- }
26
- $ret=$LASTEXITCODE
27
- }
28
- exit $ret