Skip to content

Commit

Permalink
Remove --allow-dirty option (v2) …
Browse files Browse the repository at this point in the history
* [deploy_cargo_cyclonedx.yml] Remove `--allow-dirty` option …
  … from `cargo publish` call and expand CI step names.  This should (really) close rust-lang/crates.io#8551 , see there for details.
  Signed-off-by: olf <[email protected]>

* [deploy_cyclonedx_bom.yml] Remove `--allow-dirty` option …
  … from `cargo publish` call and expand CI step names.  This should (really) close rust-lang/crates.io#8551 , see there for details.
  Signed-off-by: olf <[email protected]>

---------

Signed-off-by: olf <[email protected]>
  • Loading branch information
Olf0 authored May 25, 2024
1 parent 8ababe9 commit 68e0089
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/deploy_cargo_cyclonedx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,31 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: JQ
- name: Install JQ
run: |
sudo apt-get install -y jq
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@v2

- name: Cargo bump
- name: Cargo set-version --bump
run: |
cargo install cargo-edit
cargo set-version --package cargo-cyclonedx --bump ${{ github.event.inputs.releaseType }}
- name: Retrieve new version
- name: Retrieve new version number
run: |
echo "::set-output name=CARGO_VERSION::$(cargo metadata | jq -r '.packages[] | select(.name == "cargo-cyclonedx") | .version')"
id: version
- name: Build one time, for sanity
run: cargo build
- name: Publish
run: cargo publish --token ${{ secrets.CARGO_API_KEY }} --package cargo-cyclonedx --verbose --allow-dirty
- name: Package once (for failing this CI job if packaging fails and for rewiting the TOML file etc.)
run: cargo package --package cargo-cyclonedx --verbose --allow-dirty
- name: Configure git and add files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -am "New development bump of cargo-cylonedx to ${{steps.version.outputs.CARGO_VERSION}}"
git tag -a "cargo-cyclonedx-${{steps.version.outputs.CARGO_VERSION}}" -m "cargo-cyclonedx ${{steps.version.outputs.CARGO_VERSION}} release"
git push --follow-tags
- name: Publish crate (which unconditionally recreates the package, but build testing again is omitted)
run: cargo publish --token ${{ secrets.CARGO_API_KEY }} --package cargo-cyclonedx --verbose --no-verify

15 changes: 8 additions & 7 deletions .github/workflows/deploy_cyclonedx_bom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: JQ
- name: Install JQ
run: |
sudo apt-get install -y jq
- uses: actions/checkout@v4
Expand All @@ -23,22 +23,23 @@ jobs:

- uses: Swatinem/rust-cache@v2

- name: Cargo bump
- name: Cargo set-version --bump
run: |
cargo install cargo-edit
cargo set-version --package cyclonedx-bom --bump ${{ github.event.inputs.releaseType }}
- name: Retrieve new version
- name: Retrieve new version number
run: |
echo "::set-output name=CARGO_VERSION::$(cargo metadata | jq -r '.packages[] | select(.name == "cyclonedx-bom") | .version')"
id: version
- name: Build one time, for sanity
run: cargo build
- name: Publish
run: cargo publish --token ${{ secrets.CARGO_API_KEY }} --package cyclonedx-bom --verbose --allow-dirty
- name: Package once (for failing this CI job if packaging fails and for rewiting the TOML file etc.)
run: cargo package --package cyclonedx-bom --verbose --allow-dirty
- name: Configure git and add files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -am "New development bump of cyclonedx-bom to ${{steps.version.outputs.CARGO_VERSION}}"
git tag -a "cyclonedx-bom-${{steps.version.outputs.CARGO_VERSION}}" -m "cyclonedx-bom ${{steps.version.outputs.CARGO_VERSION}} release"
git push --follow-tags
- name: Publish crate (which unconditionally recreates the package, but build testing again is omitted)
run: cargo publish --token ${{ secrets.CARGO_API_KEY }} --package cyclonedx-bom --verbose --no-verify

0 comments on commit 68e0089

Please sign in to comment.