Skip to content

Commit 4ce2322

Browse files
chore: Adding a workflow to show semantic release version before running the full release
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
1 parent 7089918 commit 4ce2322

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
jobs:
2+
3+
get_dry_release_versions:
4+
runs-on: ubuntu-latest
5+
outputs:
6+
current_version: ${{ steps.get_versions.outputs.current_version }}
7+
next_version: ${{ steps.get_versions.outputs.next_version }}
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
with:
12+
persist-credentials: false
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: "lts/*"
17+
- name: Release (Dry Run)
18+
id: get_versions
19+
run: |
20+
CURRENT_VERSION=$(npx -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/exec -p semantic-release semantic-release --dry-run | grep "associated with version " | sed -E 's/.* version//' | sed -E 's/ on.*//')
21+
NEXT_VERSION=$(npx -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/exec -p semantic-release semantic-release --dry-run | grep 'The next release version is' | sed -E 's/.* ([[:digit:].]+)$/\1/')
22+
echo ::set-output name=current_version::$CURRENT_VERSION
23+
echo ::set-output name=next_version::$NEXT_VERSION
24+
echo "Current version is ${CURRENT_VERSION}"
25+
echo "Next version is ${NEXT_VERSION}"
26+
27+
dry-release:
28+
name: dry-release
29+
runs-on: ubuntu-latest
30+
needs: publish-web-ui-npm
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
with:
35+
persist-credentials: false
36+
- name: Setup Node.js
37+
uses: actions/setup-node@v3
38+
with:
39+
node-version-file: './ui/.nvmrc'
40+
- name: Set up Homebrew
41+
id: set-up-homebrew
42+
uses: Homebrew/actions/setup-homebrew@master
43+
- name: Setup Helm-docs
44+
run: |
45+
brew install norwoodj/tap/helm-docs
46+
- name: Release (Dry Run)
47+
run: |
48+
npx -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/exec -p semantic-release semantic-release --dry-run

0 commit comments

Comments
 (0)