Skip to content

Commit ba775c0

Browse files
committed
ci: fix cd workflow
1 parent af69c12 commit ba775c0

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/cd.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ jobs:
3535

3636
- name: 🏷️ Get package version
3737
id: get_version
38-
run: echo "VERSION=$(node -p "require('''./package.json''').version")" >> $GITHUB_OUTPUT
38+
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
3939

4040
- name: 🔍 Check if version is SNAPSHOT
4141
id: check_snapshot
4242
run: |
4343
VERSION="${{ steps.get_version.outputs.VERSION }}"
44-
if [[ "$VERSION" == *"-snapshot"* ]]; then
44+
if [[ "$VERSION" == *"-SNAPSHOT"* ]]; then
4545
echo "RELEASE=false" >> $GITHUB_OUTPUT
4646
else
4747
echo "RELEASE=true" >> $GITHUB_OUTPUT
@@ -55,6 +55,7 @@ jobs:
5555

5656
permissions:
5757
contents: write
58+
actions: read
5859

5960
env:
6061
RELEASE_VERSION: ${{ needs.fetch-version.outputs.release_version }}
@@ -71,12 +72,13 @@ jobs:
7172
node-version: "22.18.0"
7273

7374
- name: ⬇️ Download build artifact
74-
uses: dawidd6/action-download-artifact@v3
75+
uses: dawidd6/action-download-artifact@v11
7576
with:
7677
workflow: ci.yaml
7778
name: blog-${{ github.event.workflow_run.head_sha }}
7879
path: dist
7980
github_token: ${{ secrets.GITHUB_TOKEN }}
81+
run_id: ${{ github.event.workflow_run.id }}
8082

8183
- name: 📦 Create archive
8284
run: |
@@ -117,7 +119,7 @@ jobs:
117119
MINOR=$(echo ${{ env.RELEASE_VERSION }} | cut -d. -f2)
118120
PATCH=$(echo ${{ env.RELEASE_VERSION }} | cut -d. -f3)
119121
PATCH=$((PATCH + 1))
120-
NEXT_PACKAGE_VERSION="$MAJOR.$MINOR.$PATCH-snapshot"
122+
NEXT_PACKAGE_VERSION="$MAJOR.$MINOR.$PATCH-SNAPSHOT"
121123
echo "Next Version will be: ${NEXT_PACKAGE_VERSION}"
122124
echo "NEXT_PACKAGE_VERSION=${NEXT_PACKAGE_VERSION}" >> $GITHUB_ENV
123125
@@ -129,5 +131,5 @@ jobs:
129131
git config user.name "radagastbot[bot]"
130132
git config user.email "radagastbot[bot]@users.noreply.github.com"
131133
git add package.json package-lock.json
132-
git commit -m "chore(release): set next snapshot version"
134+
git commit -m "chore(release): set next SNAPSHOT version"
133135
git push

.github/workflows/docker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
id: check_snapshot
5656
run: |
5757
VERSION="${{ steps.get_package_version.outputs.VERSION }}"
58-
if [[ "$VERSION" == *"-snapshot"* ]]; then
58+
if [[ "$VERSION" == *"-SNAPSHOT"* ]]; then
5959
echo "IS_SNAPSHOT=true" >> $GITHUB_OUTPUT
6060
else
6161
echo "IS_SNAPSHOT=false" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)