Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/release-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,29 @@ jobs:
echo "PRERELEASE=--prerelease" >> "$GITHUB_ENV"
fi

- name: Extract Spin dependency version
shell: bash
run: |
# Extract either 'tag = "vX.Y.Z"' or 'rev = "..."' from the first spin-app dependency
SPIN_TAG=$(grep -m1 'spin-app.*tag' Cargo.toml | sed -n 's/.*tag = "\([^"]*\)".*/\1/p')
SPIN_REV=$(grep -m1 'spin-app.*rev' Cargo.toml | sed -n 's/.*rev = "\([^"]*\)".*/\1/p')

if [ -n "$SPIN_TAG" ]; then
echo "SPIN_VERSION=$SPIN_TAG" >> "$GITHUB_ENV"
elif [ -n "$SPIN_REV" ]; then
echo "SPIN_VERSION=$SPIN_REV" >> "$GITHUB_ENV"
else
echo "SPIN_VERSION=unknown" >> "$GITHUB_ENV"
fi

- name: create GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create ${{ env.RELEASE_TAG }} crates/${{ inputs.crate }}/artifacts/*/*.tar.gz \
--title ${{ env.RELEASE_TAG }} ${{ env.PRERELEASE }}
--title ${{ env.RELEASE_TAG }} \
--notes "Based off Spin ${{ env.SPIN_VERSION }} dependencies" \
${{ env.PRERELEASE }}

# Canary builds: upload the un-shaed merged manifest produced above.
# For tag releases, the spin-plugin-releaser step below uploads a
Expand Down
Loading