Skip to content

Commit

Permalink
allow configuring source of truth for versions
Browse files Browse the repository at this point in the history
  • Loading branch information
AdnoC committed Sep 5, 2023
1 parent 26fbd29 commit ca75d2c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/actions/auto-major-minor-release-v1/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ inputs:
release-command:
required: true
type: string
# A JSON file with a top-level key "version"
version-json:
required: "false"
type: string
default: "package.json"
release-branch:
required: true
type: string
Expand Down Expand Up @@ -53,7 +58,9 @@ runs:
- name: Get version for later steps
id: get-new-version
shell: bash
run: echo version=$(node -pe 'require("./package.json").version') >> "$GITHUB_OUTPUT"
run: echo version=$(node -pe "require('./$JSON_FILE').version") >> "$GITHUB_OUTPUT"
env:
JSON_FILE: ${{ inputs.version-json }}

- name: Generate commit list
id: commit-list
Expand Down
9 changes: 8 additions & 1 deletion .github/actions/auto-patch-release-v1/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ inputs:
release-command:
required: true
type: string
# A JSON file with a top-level key "version"
version-json:
required: "false"
type: string
default: "package.json"
release-branch:
required: true
type: string
Expand Down Expand Up @@ -83,7 +88,9 @@ runs:
- name: Get version for later steps
id: get-new-version
shell: bash
run: echo version=$(node -pe 'require("./package.json").version') >> "$GITHUB_OUTPUT"
run: echo version=$(node -pe "require('./$JSON_FILE').version") >> "$GITHUB_OUTPUT"
env:
JSON_FILE: ${{ inputs.version-json }}

- name: Generate commit list
id: commit-list
Expand Down

0 comments on commit ca75d2c

Please sign in to comment.