@@ -89,22 +89,28 @@ jobs:
8989 run : git config --global user.email "${EMAIL}"
9090 - name : Git name
9191 run : git config --global user.name "${NAME}"
92- - name : Install cargo-workspaces
93- run : cargo install cargo-workspaces @0.3.6 --locked
92+ - name : Install cargo-edit
93+ run : cargo install cargo-edit @0.13.9 --locked
9494 - name : What version are we?
9595 id : luwenver
9696 run : |
9797 export luwen_ver="$( cargo metadata --format-version 1 | jq '.packages[] | select( .name =="luwen" ) | .version' | sed 's/"//g' )"
9898 echo "luwen_version=${luwen_ver}"
9999 echo "luwen_version=${luwen_ver}" >> "$GITHUB_OUTPUT"
100100 - name : Bump the version
101- run : cargo ws version ${{ github.event.inputs.version_bump_type }} --allow-branch ${{ needs.tempbranch.outputs.rc_ref }} --no-git-tag --message "Cargo Release %v" -y
101+ run : cargo set- version --package=luwen --bump= ${{ github.event.inputs.version_bump_type }}
102102 - name : What NEW Version?
103103 id : new-luwen-version
104104 run : |
105105 export luwen_version_new="$( cargo metadata --format-version 1 | jq '.packages[] | select( .name =="luwen" ) | .version' | sed 's/"//g' )"
106106 echo "luwen_version_new=${luwen_version_new}"
107107 echo "luwen_version_new=${luwen_version_new}" >> "$GITHUB_OUTPUT"
108+ - name : Commit version bump
109+ run : |
110+ git add .
111+ git commit -m "Cargo Release ${{ steps.new-luwen-version.outputs.luwen_version_new }}"
112+ git pull --rebase
113+ git push
108114 - name : Parse version from string
109115 id : version
110116 uses : release-kit/semver@v2
@@ -390,6 +396,31 @@ jobs:
390396 verbose : true
391397 skip-existing : true
392398
399+ # ##
400+ # Publish to crates.io
401+ # ##
402+ publish-crates-io :
403+ name : Publish Rust package
404+ needs :
405+ - changelogs
406+ - tagrelease
407+ runs-on : ubuntu-latest
408+ permissions :
409+ id-token : write
410+ steps :
411+ - uses : actions/checkout@v4
412+ with :
413+ ref : ${{ needs.changelogs.outputs.git_hash }}
414+ fetch-tags : true
415+ fetch-depth : 0
416+ - name : Authenticate with crates.io
417+ uses : rust-lang/crates-io-auth-action@v1
418+ id : auth
419+ - name : Publish crates
420+ run : cargo publish --workspace
421+ env :
422+ CARGO_REGISTRY_TOKEN : ${{ steps.auth.outputs.token }}
423+
393424 # ##
394425 # Publish PyPi
395426 # ##
0 commit comments