File tree Expand file tree Collapse file tree 2 files changed +37
-2
lines changed Expand file tree Collapse file tree 2 files changed +37
-2
lines changed Original file line number Diff line number Diff line change 1- name : publish
1+ name : autopublish
22on :
33 workflow_dispatch : # We can add version input when 1.0 is released and scheduled releases are removed
44
2525 - name : Install cargo-workspaces
2626 run : cargo install cargo-workspaces
2727
28- - name : Release
28+ - name : Publish Crates
2929 env :
3030 CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
3131 PATCH : ${{ github.run_number }}
Original file line number Diff line number Diff line change 1+ name : publish-libs
2+ on :
3+ workflow_dispatch :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - ' lib/**'
9+
10+ jobs :
11+ publish-libs :
12+ name : publish
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v3
17+ with :
18+ fetch-depth : 0
19+
20+ - name : Install Rust toolchain
21+ run : rustup update --no-self-update stable
22+
23+ - name : Install cargo-workspaces
24+ run : cargo install cargo-workspaces
25+
26+ - name : Publish Crates
27+ env :
28+ CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
29+ shell : bash
30+ run : |
31+ git config --global user.email "runner@gha.local"
32+ git config --global user.name "Github Action"
33+ # Remove r-a crates from the workspaces so we don't auto-publish them as well
34+ sed -i 's/ "crates\/\*"//' ./Cargo.toml
35+ cargo workspaces publish --yes --exact --from-git --no-git-commit --allow-dirty
You can’t perform that action at this time.
0 commit comments