Skip to content

Commit b99cede

Browse files
committed
feat: add separator input to release related workflows
1 parent ab18a68 commit b99cede

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

.github/workflows/release-check.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
required: false
1111
type: string
1212
default: '["version.json"]'
13+
separator:
14+
required: false
15+
type: string
16+
default: '/'
1317
outputs:
1418
json:
1519
description: JSON aggregation of release.json artifacts
@@ -62,6 +66,7 @@ jobs:
6266
env:
6367
GITHUB_TOKEN: ${{ github.token }}
6468
SOURCE: ${{ matrix.source }}
69+
SEPARATOR: ${{ inputs.separator }}
6570
HEAD_FULL_NAME: ${{ fromJSON(steps.pr.outputs.json).head.repo.full_name }}
6671
HEAD_SHA: ${{ fromJSON(steps.pr.outputs.json).head.sha }}
6772
run: |
@@ -70,7 +75,7 @@ jobs:
7075
if [[ "$root" == "." ]]; then
7176
prefix="v"
7277
else
73-
prefix="$root/v"
78+
prefix="${root}${SEPARATOR}v"
7479
fi
7580
echo "prefix=$prefix" | tee -a $GITHUB_OUTPUT
7681
# If `version.json` file doesn't exists, `version` is `""` and `404` is printed on stderr.

.github/workflows/releaser.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
required: false
1111
type: string
1212
default: '["version.json"]'
13+
separator:
14+
required: false
15+
type: string
16+
default: '/'
1317
outputs:
1418
json:
1519
description: JSON aggregation of release.json artifacts
@@ -31,12 +35,13 @@ jobs:
3135
name: Determine version
3236
env:
3337
SOURCE: ${{ matrix.source }}
38+
SEPARATOR: ${{ inputs.separator }}
3439
run: |
35-
prefix="$(dirname "$SOURCE")"
36-
if [[ "$prefix" == "." ]]; then
40+
root="$(dirname "$SOURCE")"
41+
if [[ "$root" == "." ]]; then
3742
prefix="v"
3843
else
39-
prefix="$prefix/v"
44+
prefix="${root}${SEPARATOR}v"
4045
fi
4146
echo "prefix=$prefix" | tee -a $GITHUB_OUTPUT
4247
version="$(yq -r '.workspace.package.version // .package.version // .version // ""' "$SOURCE")"

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Unreleased
88

9+
## [1.0.8] - 2024-07-25
10+
### Added
11+
- separator input to releaser and releaser-check workflows
12+
913
## [1.0.7] - 2024-07-25
1014
### Added
1115
- aggregation of release.json artifacts as workflow outputs

0 commit comments

Comments
 (0)