Skip to content

Commit

Permalink
Make the release real before running script
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmopetrich committed Nov 5, 2024
1 parent de640b0 commit f5d8fdc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,20 @@ jobs:
echo "expected-1=${EXPECTED_1}" >> "${GITHUB_OUTPUT}"
echo "expected-2=${EXPECTED_2}" >> "${GITHUB_OUTPUT}"
- name: Run action
id: action
uses: ./repo/
with:
artifacts-directory: repo/.test/artifacts
push: false
release-name-prefix: ${{ env.TESTNAME }}-${{ github.job }}-
package-name: foolib
repo-directory: repo
- name: Convert to a non-draft release
# Required for non-logged-in users to see it
working-directory: repo
env:
GH_TOKEN: ${{ github.token }}
run: gh release edit '${{ steps.action.outputs.release-name }}
- name: Run script
working-directory: repo
run: ./update-files
Expand Down
6 changes: 3 additions & 3 deletions deployed/update-files
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ do_update () {
fi

local status=0
sha256sum --check --quiet --strict "${contents_checksum_file}" 2>/dev/null || status=$?
sha256sum --check --quiet --strict "${contents_checksum_file}" >/dev/null 2>&1 || status=$?
if [ $status -eq 0 ]; then
exit 0
fi
Expand All @@ -59,7 +59,7 @@ do_update () {
fi

local status=0
sha256sum --check --strict --quiet ${artifact_checksum_file} 2>/dev/null|| status=$?
sha256sum --check --strict --quiet ${artifact_checksum_file} >/dev/null 2>&1 || status=$?
if [ $status -ne 0 ]; then
local url="$(<$artifact_url_file)"
echo "Updating ${artifact_file}"
Expand All @@ -73,7 +73,7 @@ do_update () {
unzip "${artifact}"

local status=0
sha256sum --check --quiet "${contents_checksum_file}" 2>/dev/null || status=$?
sha256sum --check --quiet "${contents_checksum_file}" >/dev/null 2>&1 || status=$?
if [ $status -ne ]; then
echo "One or more checksums did not validate after downloading the release artifact" >&2
echo "Run 'sha256sum -cw ${contents_checksum_file} from inside the repository to see which" >&2
Expand Down

0 comments on commit f5d8fdc

Please sign in to comment.