Skip to content

Commit

Permalink
fix(release-to-candidate): fix broken manifests when project_root i…
Browse files Browse the repository at this point in the history
…s used

In cases where project root is used, the workflow changes directory, and then writes the manifest.

In subsequent steps, a manifest is written without changing directory, meaning there is incomplete information, resulting in broken tables as seen in this issue: snapcrafters/ffmpeg-2404-sdk#12
  • Loading branch information
jnsgruk authored Apr 23, 2024
1 parent a7b7a24 commit 953de29
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions release-to-candidate/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ runs:
# https://bugs.launchpad.net/snapcraft/+bug/1885150
yq -i '.architectures |= [{"build-on": env(arch)}]' "$yaml_path"
manifest="${PWD}/manifest-${arch}.yaml"
cd "$project_root" && git init || exit
if ! snapcraft remote-build --launchpad-accept-public-upload; then
cat "${name}_${arch}.txt"
fi
Expand All @@ -93,8 +96,8 @@ runs:
if [[ -n "$project_root" ]]; then
echo "snap=${project_root}/${name}_${version}_${arch}.snap" >> "$GITHUB_OUTPUT"
fi
echo "name: ${name}" >> "manifest-${arch}.yaml"
echo "architecture: ${arch}" >> "manifest-${arch}.yaml"
echo "name: ${name}" >> "$manifest"
echo "architecture: ${arch}" >> "manifest"
- name: Review the built snap
uses: diddlesnaps/snapcraft-review-action@v1
Expand Down

0 comments on commit 953de29

Please sign in to comment.