-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
28 lines (26 loc) · 1.01 KB
/
action.yml
File metadata and controls
28 lines (26 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: 'Dump-packagejson-version'
author: 'PiQuark6046 and contributors'
description: 'Dump the version of package.json to the version defined in the tags connected to the triggered release or push.'
inputs:
package-json-dir-path:
description: 'Directory location of a single package.json file to dump the version to'
required: false
default: ''
runs:
using: 'composite'
steps:
- name: Install npm packages
run: |
pnpm i --no-lockfile
shell: bash
working-directory: ${{ github.action_path }}
- name: Dump version of package.json to version defined in tags connected to triggered release
run: |
npm run ci -- --ref "$REF" --package-json-dir-path "$PACKAGE_JSON_DIR_PATH" --workspace-path "$WORKSPACE_PATH"
shell: bash
env:
REF: ${{ github.ref }}
PACKAGE_JSON_DIR_PATH: ${{ inputs.package-json-dir-path }}
WORKSPACE_PATH: ${{ github.workspace }}
if: github.ref_type == 'tag'
working-directory: ${{ github.action_path }}