Skip to content

Commit 56c8437

Browse files
committed
Fix cargo publish must run in actual package
rust-lang/cargo#1169
1 parent 0769a32 commit 56c8437

File tree

1 file changed

+18
-22
lines changed

1 file changed

+18
-22
lines changed

azure-pipelines.yml

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,6 @@ steps:
5959
displayName: Install rust
6060
condition: ne( variables['Agent.OS'], 'Windows_NT' )
6161

62-
- bash: |
63-
ln README.md packages/core/README.md
64-
./scripts/package.sh --allow-dirty
65-
displayName: Package crates
66-
- task: CopyFiles@2
67-
inputs:
68-
sourceFolder: $(Build.SourcesDirectory)/target/package
69-
contents: '**.crate'
70-
targetFolder: $(Build.CratesDirectory)
71-
- task: ArchiveFiles@2
72-
inputs:
73-
rootFolderOrFile: $(Build.CratesDirectory)
74-
archiveType: tar
75-
tarCompression: gz
76-
archiveFile: $(Build.ArtifactStagingDirectory)/crate/scdlang-$(TARGET).tar.gz
77-
- task: PublishBuildArtifacts@1
78-
inputs:
79-
pathtoPublish: '$(Build.ArtifactStagingDirectory)/crate'
80-
artifactName: crates
81-
8262
- script: rustup target add $(TARGET)
8363
displayName: Install target toolchain
8464

@@ -135,11 +115,27 @@ steps:
135115
# isDraft: true
136116
# addChangeLog: true
137117

118+
- bash: |
119+
ln README.md packages/core/README.md
120+
./scripts/package.sh --allow-dirty
121+
displayName: Package crates
122+
- task: CopyFiles@2
123+
inputs:
124+
sourceFolder: $(Build.SourcesDirectory)/target/package
125+
contents: '**.crate'
126+
targetFolder: $(Build.ArtifactStagingDirectory)/crate
127+
- task: PublishBuildArtifacts@1
128+
inputs:
129+
pathtoPublish: '$(Build.ArtifactStagingDirectory)/crate'
130+
artifactName: crates
131+
138132
# TODO: Split this as a separate job after GitHubRelease@0 done
139133
# But it has a caveat, it need to install rust again :sad: (no build needed)
140-
- powershell: |
134+
- bash: |
141135
cargo login $env:DRSENSOR
142-
cargo publish
136+
for cargo_toml in packages/{*,transpiler/*}/Cargo.toml; do
137+
cargo publish --manifest-path $cargo_toml --no-verify
138+
done
143139
displayName: Publish to crates.io
144140
condition: and(and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')), eq( variables['Agent.OS'], 'Windows_NT' ))
145141
env:

0 commit comments

Comments
 (0)