Skip to content

Commit

Permalink
.github/workflows/release: no cargo publish if the repo is not upstream
Browse files Browse the repository at this point in the history
Signed-off-by: jiaxiao zhou <duibao55328@gmail.com>
  • Loading branch information
Mossaka committed Oct 8, 2024
1 parent 18ba4f7 commit 08fa2eb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,13 @@ jobs:
core.setOutput('is_shim', true);
}
### If we are releasing a crate rather than producing a bin, check for crates.io access
<<<<<<< Updated upstream
- name: Check crates.io ownership
if: ${{ steps.runtime_sub.outputs.is_shim != 'true' }}
=======
- name: Add crates.io ownership
if: ${{ steps.runtime_sub.outputs.is_shim != 'true' && github.repository == 'containerd/runwasi' }}
>>>>>>> Stashed changes
run: |
cargo owner --list ${{ inputs.crate }} | grep github:containerd:runwasi-committers || \
cargo owner --add github:containerd:runwasi-committers ${{ inputs.crate }}
Expand Down Expand Up @@ -134,7 +139,7 @@ jobs:
with:
path: release
- name: Cargo publish
if: ${{ matrix.is_shim != 'true' }}
if: ${{ matrix.is_shim != 'true' && github.repository == 'containerd/runwasi' }}
run: cargo publish ${{ inputs.dry_run && '--dry-run' || '' }} --package ${{ matrix.crate }} --verbose --locked
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_PUBLISH_TOKEN }}
Expand Down

0 comments on commit 08fa2eb

Please sign in to comment.