Skip to content

Commit

Permalink
chore: test exec
Browse files Browse the repository at this point in the history
  • Loading branch information
floryn08 committed Aug 26, 2024
1 parent 33c227f commit 62c52b5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
14 changes: 14 additions & 0 deletions .github/ci-helpers/update_versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# Check if a version parameter is provided
if [ -z "$1" ]; then
echo "Usage: $0 <version>"
exit 1
fi

# Assign the parameter to a variable
version=$1

sed -i "s/^version:.*/version: ${version}/" deployment/helm/Chart.yaml
sed -i "s/^appVersion:.*/appVersion: ${version}/" deployment/helm/Chart.yaml
sed -i "s/:[0-9]\+\.[0-9]\+\.[0-9]\+/:${version}/" deployment/helm/values.yaml
24 changes: 0 additions & 24 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ jobs:
with:
fetch-depth: "0"

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Set up Node.js
uses: actions/setup-node@v4.0.3
with:
Expand All @@ -36,22 +31,3 @@ jobs:
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Bump package.json
run: |
npm version ${nextRelease.version} --allow-same-version --git-tag-version false
npm ci
- name: Bump helm chart
run: |
sed -i "s/^version:.*/version: ${nextRelease.version}/" deployment/helm/Chart.yaml
sed -i "s/^appVersion:.*/appVersion: ${nextRelease.version}/" deployment/helm/Chart.yaml
sed -i "s/:[0-9]\+\.[0-9]\+\.[0-9]\+/:${nextRelease.version}/" deployment/helm/values.yaml
- name: Push version updates and create tag
run: |
git add .
git commit -m "ci: version bump ${nextRelease.version} [skip ci]"
git tag ${nextRelease.version}
git push
git push origin tag ${nextRelease.version}
12 changes: 12 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@
"npmPublish": false
}
],
[
"@semantic-release/exec",
{
"verifyReleaseCmd": ".github/ci-helpers/update_versions.sh ${nextRelease.version}"
}
],
[
"@semantic-release/git",
{
"assets": ["package.json", "deployment/helm/Chart.yaml"]
}
],
"@semantic-release/github"
]
}

0 comments on commit 62c52b5

Please sign in to comment.