Skip to content

Commit d4f4f23

Browse files
authored
chore(ci): automatically rename version (#2548)
Signed-off-by: Miguel Martinez <[email protected]>
1 parent bd45815 commit d4f4f23

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/release.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ jobs:
2525
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2626
- name: Install Chainloop
2727
run: |
28-
curl -sfL https://dl.chainloop.dev/cli/install.sh | bash -s
28+
# Need the ee CLI to have access to project management capabilities
29+
curl -sfL https://dl.chainloop.dev/cli/install.sh | bash -s -- --ee
2930
3031
- name: Initialize Attestation
3132
id: init_attestation
@@ -161,6 +162,12 @@ jobs:
161162
gh release download ${{ github.ref_name }} -A tar.gz -O /tmp/source-code.tar.gz
162163
chainloop attestation add --name source-code --value /tmp/source-code.tar.gz --kind ARTIFACT --attestation-id ${{ env.ATTESTATION_ID }}
163164
165+
- name: Promote Chainloop Project Version
166+
run: |
167+
current_version="$(cat .chainloop.yml | awk '/^projectVersion:/ {print $2}')"
168+
# Rename the existing pre-release into the actual release name
169+
chainloop project version update --project ${CHAINLOOP_PROJECT_NAME} --name $current_version --new-name ${{ github.ref_name }} || true
170+
164171
- name: Bump Chart and Dagger Version
165172
run: .github/workflows/utils/bump-chart-and-dagger-version.sh deployment/chainloop extras/dagger ${{ github.ref_name }}
166173
- name: Bump Project Version

0 commit comments

Comments
 (0)