@@ -251,7 +251,6 @@ jobs:
251251 push-to-codecommit :
252252 concurrency : push-to-codecommit
253253 name : Push to CodeCommit
254- if : github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'demosdemon/git-remote-codecommit'
255254 needs : [finalize-coveralls-run, build-docs, build-binaries]
256255 runs-on : ubuntu-latest
257256 env :
@@ -263,25 +262,30 @@ jobs:
263262 with :
264263 fetch-depth : 0 # need the history in order to push to CodeCommit
265264
266- - name : configure aws credentials
265+ - name : Configure AWS credentials
266+ if : github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'demosdemon/git-remote-codecommit'
267267 uses : aws-actions/configure-aws-credentials@v4.0.2
268268 with :
269269 role-to-assume : arn:aws:iam::339712996426:role/github-git-remote-codecommit
270270 aws-region : ${{ env.AWS_REGION }}
271271
272- - name : Install Rust
273- uses : actions-rust-lang/setup-rust-toolchain@v1
272+ - name : Download git-remote-codecommit
273+ uses : actions/download-artifact@v4
274+ with :
275+ name : git-remote-codecommit-ubuntu-latest
276+ path : target/release-lto
274277
275- - name : Fetch cargo dependencies
276- run : cargo v --locked
278+ - name : Make git-remote-codecommit executable
279+ run : chmod +x target/release-lto/git-remote-codecommit
277280
278- - name : Install git-remote-codecommit
279- run : cargo v-install --frozen --profile= release-lto --path=crates/git-remote-codecommit
281+ - name : Add git-remote-codecommit to PATH
282+ run : echo "$PWD/target/ release-lto" >> $GITHUB_PATH
280283
281284 - name : Check version
282285 run : git-remote-codecommit --version
283286
284287 - name : Push to CodeCommit
288+ if : github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'demosdemon/git-remote-codecommit'
285289 run : |
286290 git remote add aws codecommit://git-remote-codecommit
287291 git push aws HEAD:refs/heads/main
0 commit comments