Skip to content

Commit

Permalink
ci: Verify released binary version
Browse files Browse the repository at this point in the history
Signed-off-by: Arjun Raja Yogidas <[email protected]>
  • Loading branch information
coderbirju committed Sep 18, 2024
1 parent 58e5131 commit e9ee71b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 13 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/release-automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_dispatch:
workflow_call:
env:
GO_VERSION: '1.23.0'
GO_VERSION: '1.22.7'
permissions:
contents: write
deployments: write
Expand All @@ -30,6 +30,8 @@ jobs:
STATIC_BINARY_NAME: ''
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-tags: true
- name: 'Echo RELEASE_TAG ENV'
run: echo ${{ env.RELEASE_TAG }}
- name: Setup variables and release directories
Expand All @@ -45,6 +47,18 @@ jobs:
run: make licenses
- name: Create release binaries
run: make RELEASE_TAG=${{ env.RELEASE_TAG }} release
- name: Verify Release version
run: |
mkdir output
tar -xzf release/${{ env.DYNAMIC_BINARY_NAME }} -C ./output
BINARY_VERSION=$(./output/finch-daemon --version | grep -oP '\d+\.\d+\.\d+')
export release_tag=${{ env.RELEASE_TAG }}
export release_version=${release_tag/v/}
if ["$BINARY_VERSION" != "$release_version"]; then
echo "Version mismatch"
exit 1
fi
shell: bash
- uses: actions/upload-artifact@v4
with:
name: artifacts
Expand Down
24 changes: 12 additions & 12 deletions scripts/verify-release-artifacts.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# #!/usr/bin/env bash
#!/usr/bin/env bash

# # Copyright The Soci Snapshotter Authors.
# Copyright The Finch Daemon Authors.

# # Licensed under the Apache License, Version 2.0 (the "License");
# # you may not use this file except in compliance with the License.
# # You may obtain a copy of the License at
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# # http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0

# # Unless required by applicable law or agreed to in writing, software
# # distributed under the License is distributed on an "AS IS" BASIS,
# # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# # See the License for the specific language governing permissions and
# # limitations under the License.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# # A script to verify artifacts from release automation.
# A script to verify artifacts from release automation.

set -o pipefail

Expand Down

0 comments on commit e9ee71b

Please sign in to comment.