File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 description : ' The release tag (e.g. v1.0.0)'
77 required : true
88 type : string
9+ secrets :
10+ CARGO_REGISTRY_TOKEN :
11+ description : ' Token for publishing to crates.io'
12+ required : true
913
1014env :
1115 CARGO_TERM_COLOR : always
5559 gitopolis-windows-x86_64.zip
5660 gitopolis-macos-x86_64.tar.gz
5761 SHA256SUMS.txt
62+
63+ - name : Update Version for crates.io
64+ run : |
65+ VERSION="${{ inputs.release_tag }}"
66+ # Strip the 'v' prefix if present
67+ VERSION="${VERSION#v}"
68+ sed -i "s/0\\.0\\.0-git/$VERSION/" Cargo.toml
69+ sed -i "s/0\\.0\\.0-git/$VERSION/" Cargo.lock
70+
71+ - name : Publish to crates.io
72+ # --no-verify skips the verification build since CI already built and tested
73+ # --allow-dirty allows publishing with modified Cargo.toml/Cargo.lock (version update)
74+ run : cargo publish --no-verify --allow-dirty --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
Original file line number Diff line number Diff line change 1515 uses : ./.github/workflows/_release.yml
1616 with :
1717 release_tag : ${{ github.ref_name }}
18+ secrets :
19+ CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
You can’t perform that action at this time.
0 commit comments