Skip to content

Commit c587871

Browse files
authored
chore(cd): install binaries required for build (#500)
1 parent 9be9a80 commit c587871

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ jobs:
106106
cargo binstall -y --force leptosfmt
107107
cargo binstall -y --force trunk
108108
109+
- name: Retrieve Git Commit SHA
110+
run: echo "GIT_COMMIT_SHA7=$(git rev-parse --short ${{ github.sha }}) >> $GITHUB_ENV
111+
109112
- name: Retrieve Version
110113
run: |
111114
git config --global user.name 'github-actions[bot]'
@@ -114,7 +117,7 @@ jobs:
114117
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
115118
echo "CRATE_VERSION=$(cargo tag --no-tag --no-commit -p=v ${{ inputs.version }})" >> $GITHUB_ENV
116119
else
117-
echo "CRATE_VERSION=$(cargo tag --no-tag --no-commit -p=v prerelease pre.$(date +%Y%m%d%H%M%S))" >> $GITHUB_ENV
120+
echo "CRATE_VERSION=$(cargo tag --no-tag --no-commit -p=v prerelease pre.$GIT_COMMIT_SHA7)" >> $GITHUB_ENV
118121
fi
119122
120123
- name: Build binary
@@ -166,8 +169,10 @@ jobs:
166169
uses: cargo-bins/cargo-binstall@main
167170

168171
- name: Install Rust Binaries
169-
run: |
170-
cargo binstall -y --force cargo-tag
172+
run: cargo binstall -y --force cargo-tag
173+
174+
- name: Retrieve Git Commit SHA
175+
run: echo "GIT_COMMIT_SHA7=$(git rev-parse --short ${{ github.sha }}) >> $GITHUB_ENV
171176

172177
- name: Commit Version Bump
173178
run: |
@@ -177,7 +182,7 @@ jobs:
177182
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
178183
echo "CRATE_VERSION=$(cargo tag -p=v ${{ inputs.version }})" >> $GITHUB_ENV
179184
else
180-
echo "CRATE_VERSION=$(cargo tag -p=v prerelease pre.$(date +%Y%m%d%H%M%S))" >> $GITHUB_ENV
185+
echo "CRATE_VERSION=$(cargo tag -p=v prerelease pre.$GIT_COMMIT_SHA7)" >> $GITHUB_ENV
181186
fi
182187
git push origin main --follow-tags
183188
@@ -186,6 +191,11 @@ jobs:
186191
env:
187192
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
188193

194+
- name: Install Rust Binaries
195+
run: |
196+
cargo binstall -y --force leptosfmt
197+
cargo binstall -y --force trunk
198+
189199
- name: Prep Assets and Binary
190200
run: make release
191201

0 commit comments

Comments
 (0)