Skip to content

Commit 6f5d489

Browse files
committed
ci(workflows): use flex-development/manver-action
- https://github.com/flex-development/manver-action Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
1 parent 66e3fb5 commit 6f5d489

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

.dictionary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ hmarr
1515
jchen
1616
kaisugi
1717
ksort
18+
manver
1819
mkbuild
1920
nvmrc
2021
pkgs

.github/workflows/ci.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
# - https://github.com/codecov/test-results-action
2525
# - https://github.com/dprint/check
2626
# - https://github.com/flex-development/grease
27+
# - https://github.com/flex-development/manver-action
2728
# - https://github.com/hmarr/debug-action
2829
# - https://github.com/streetsidesoftware/cspell-action
2930
# - https://yarnpkg.com/cli/pack
@@ -57,7 +58,7 @@ jobs:
5758
runs-on: ubuntu-latest
5859
outputs:
5960
cache-key: ${{ steps.cache-key.outputs.result }}
60-
version: ${{ steps.build-version.outputs.result }}
61+
version: ${{ steps.version.outputs.build }}
6162
steps:
6263
- id: debug
6364
name: Print environment variables and event payload
@@ -89,13 +90,9 @@ jobs:
8990
with:
9091
key: ${{ steps.cache-key.outputs.result }}
9192
path: ${{ env.CACHE_PATH }}
92-
- id: manifest-version
93-
name: Get manifest version
94-
run: echo "result=$(jq .version package.json -r)" >>$GITHUB_OUTPUT
95-
- id: build-version
96-
name: Get build version
97-
run: |
98-
echo "result=${{ startsWith(github.head_ref || github.ref_name, 'release/') && steps.manifest-version.outputs.result || format('{0}+{1}', steps.manifest-version.outputs.result, github.event.pull_request.head.sha || github.sha) }}" >>$GITHUB_OUTPUT
93+
- id: version
94+
name: Extract version metadata
95+
uses: flex-development/manver-action@329bfb0
9996
gitguardian:
10097
runs-on: ubuntu-latest
10198
steps:

.github/workflows/publish.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# - https://github.com/actions/setup-node
1818
# - https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#yarn2-configuration
1919
# - https://github.com/hmarr/debug-action
20+
# - https://github.com/flex-development/manver-action
2021

2122
---
2223
name: publish
@@ -54,16 +55,16 @@ jobs:
5455
ref: ${{ github.ref }}
5556
- id: version
5657
name: Get package version
57-
run: echo "result=$(jq .version package.json -r)" >>$GITHUB_OUTPUT
58+
uses: flex-development/manver-action@329bfb0
5859
- id: artifact
5960
name: Get release artifact download url
6061
run: |
61-
echo "result=${{ github.event_name == 'release' && github.event.release.assets[0].browser_download_url || format('{0}/{1}/releases/download/{2}/%40{3}-{4}-{5}.tgz', github.server_url, github.repository, inputs.tag || github.ref_name, github.repository_owner, github.event.repository.name, steps.version.outputs.result) }}" >>$GITHUB_OUTPUT
62+
echo "result=${{ github.event_name == 'release' && github.event.release.assets[0].browser_download_url || format('{0}/{1}/releases/download/{2}/%40{3}-{4}-{5}.tgz', github.server_url, github.repository, inputs.tag || github.ref_name, github.repository_owner, github.event.repository.name, steps.version.outputs.manifest) }}" >>$GITHUB_OUTPUT
6263
- id: dist-tag
6364
name: Get dist tag
6465
uses: flex-development/dist-tag-action@1.1.2
6566
with:
66-
target: ${{ steps.version.outputs.result }}
67+
target: ${{ steps.version.outputs.manifest }}
6768
- id: command
6869
name: Get publish command
6970
env:
@@ -77,7 +78,7 @@ jobs:
7778
- id: npm
7879
name: Get environment url (npm)
7980
run: |
80-
echo "result=$(echo "https://npmjs.com/package/@${{ github.repository }}/v/${{ steps.version.outputs.result }}" | xargs)" >>$GITHUB_OUTPUT
81+
echo "result=$(echo "https://npmjs.com/package/@${{ github.repository }}/v/${{ steps.version.outputs.manifest }}" | xargs)" >>$GITHUB_OUTPUT
8182
gpr:
8283
needs: preflight
8384
permissions:

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
# - https://github.com/crazy-max/ghaction-import-gpg
2020
# - https://github.com/flex-development/dist-tag-action
2121
# - https://github.com/flex-development/grease
22+
# - https://github.com/flex-development/manver-action
2223
# - https://github.com/hmarr/debug-action
2324
# - https://yarnpkg.com/cli/pack
2425

@@ -51,7 +52,7 @@ jobs:
5152
outputs:
5253
prerelease: ${{ steps.dist-tag.outputs.prerelease }}
5354
tag: ${{ steps.tag.outputs.result }}
54-
version: ${{ steps.version.outputs.result }}
55+
version: ${{ steps.version.outputs.manifest }}
5556
url: ${{ steps.url.outputs.result }}
5657
steps:
5758
- id: debug
@@ -64,14 +65,14 @@ jobs:
6465
ref: ${{ env.REF }}
6566
- id: version
6667
name: Get release version
67-
run: echo "result=$(jq .version package.json -r)" >>$GITHUB_OUTPUT
68+
uses: flex-development/manver-action@329bfb0
6869
- id: tag-prefix
6970
name: Get release tag prefix
7071
run: echo "result=$(jq .tagprefix grease.config.json -r)" >>$GITHUB_OUTPUT
7172
- id: tag
7273
name: Get release tag
7374
run: |
74-
echo "result=${{ format('{0}{1}', steps.tag-prefix.outputs.result, steps.version.outputs.result) }}" >>$GITHUB_OUTPUT
75+
echo "result=${{ format('{0}{1}', steps.tag-prefix.outputs.result, steps.version.outputs.manifest) }}" >>$GITHUB_OUTPUT
7576
- id: url
7677
name: Get release url
7778
run: |
@@ -80,7 +81,7 @@ jobs:
8081
name: Get dist tag
8182
uses: flex-development/dist-tag-action@1.1.2
8283
with:
83-
target: ${{ steps.version.outputs.result }}
84+
target: ${{ steps.version.outputs.manifest }}
8485
publish:
8586
needs: preflight
8687
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)