File tree Expand file tree Collapse file tree 1 file changed +0
-51
lines changed Expand file tree Collapse file tree 1 file changed +0
-51
lines changed Original file line number Diff line number Diff line change 82
82
# command: publish
83
83
# args: --dry-run --manifest-path lychee-bin/Cargo.toml
84
84
85
- publish :
86
- if : startsWith(github.ref, 'refs/tags/')
87
- needs :
88
- - test
89
- - lint
90
- - check-feature-flags
91
- - publish-check
92
- runs-on : ubuntu-latest
93
- steps :
94
- - uses : actions/checkout@v4
95
-
96
- - name : cargo fetch
97
- uses : actions-rs/cargo@v1
98
- with :
99
- command : fetch
100
-
101
- # If there was an issue with the build pipeline, the lib might
102
- # already be published but the binary not. In that case, we
103
- # want to skip over the lib publishing step.
104
- - name : Check if lychee-lib is already published
105
- id : check-release
106
- run : |
107
- VERSION=$(cargo pkgid --manifest-path lychee-lib/Cargo.toml | cut -d "#" -f2)
108
- if cargo search lychee-lib | grep -q \"$VERSION\"; then
109
- echo "Lychee-lib version $VERSION is already published. Skipping."
110
- echo "published=true" >> $GITHUB_OUTPUT
111
- else
112
- echo "published=false" >> $GITHUB_OUTPUT
113
- fi
114
-
115
- - name : cargo publish lychee-lib
116
- if : steps.check-release.outputs.published == 'false'
117
- uses : actions-rs/cargo@v1
118
- env :
119
- CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
120
- with :
121
- command : publish
122
- args : --manifest-path lychee-lib/Cargo.toml
123
-
124
- - name : Wait for crates.io publication
125
- run : sleep 60s
126
- shell : bash
127
-
128
- - name : cargo publish lychee
129
- uses : actions-rs/cargo@v1
130
- env :
131
- CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
132
- with :
133
- command : publish
134
- args : --manifest-path lychee-bin/Cargo.toml
135
-
136
85
check-feature-flags :
137
86
runs-on : ubuntu-latest
138
87
steps :
You can’t perform that action at this time.
0 commit comments