-
Notifications
You must be signed in to change notification settings - Fork 0
Add GitHub Actions workflows for automated crates.io publishing and CI/CD #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
30a00e0
Initial plan
Copilot 52e11d9
Initial assessment and planning for crates.io publishing automation
Copilot 487186e
Add GitHub Actions workflows for CI/CD and automated crates.io publis…
Copilot 43ddd8c
Add setup instructions for maintainers to configure crates.io publishing
Copilot 77b250e
Merge branch 'main' into copilot/fix-4
Theaxiom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "ignorePatterns": [ | ||
| { | ||
| "pattern": "^http://localhost" | ||
| }, | ||
| { | ||
| "pattern": "^https://localhost" | ||
| } | ||
| ], | ||
| "replacementPatterns": [], | ||
| "httpHeaders": [ | ||
| { | ||
| "urls": ["https://crates.io", "https://docs.rs"], | ||
| "headers": { | ||
| "User-Agent": "Mozilla/5.0 (compatible; link-checker)" | ||
| } | ||
| } | ||
| ], | ||
| "timeout": "10s", | ||
| "retryOn429": true, | ||
| "retryCount": 3, | ||
| "fallbackHttpStatus": [400, 401, 403, 404, 429, 500, 502, 503, 504] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main, develop ] | ||
| pull_request: | ||
| branches: [ main, develop ] | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Test | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| rust: | ||
| - stable | ||
| - beta | ||
| - nightly | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| toolchain: ${{ matrix.rust }} | ||
| components: rustfmt, clippy | ||
|
|
||
| - name: Cache cargo registry | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
| ~/.cargo/git | ||
| target | ||
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-cargo- | ||
|
|
||
| - name: Check formatting | ||
| if: matrix.rust == 'stable' | ||
| run: cargo fmt --all -- --check | ||
|
|
||
| - name: Run clippy | ||
| if: matrix.rust == 'stable' | ||
| run: cargo clippy --all-targets --all-features -- -D warnings | ||
|
|
||
| - name: Build | ||
| run: cargo build --verbose --all-features | ||
|
|
||
| - name: Run tests | ||
| run: cargo test --verbose --all-features | ||
|
|
||
| - name: Test CLI | ||
| run: | | ||
| cargo run -- --help | ||
| cargo run -- check --help | ||
| cargo run -- rules | ||
|
|
||
| coverage: | ||
| name: Coverage | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Install cargo-llvm-cov | ||
| uses: taiki-e/install-action@cargo-llvm-cov | ||
|
|
||
| - name: Generate code coverage | ||
| run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info | ||
|
|
||
| - name: Upload coverage to Codecov | ||
| uses: codecov/codecov-action@v4 | ||
| with: | ||
| file: lcov.info | ||
| fail_ci_if_error: true | ||
|
|
||
| security: | ||
| name: Security Audit | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Install cargo-audit | ||
| run: cargo install cargo-audit | ||
|
|
||
| - name: Run security audit | ||
| run: cargo audit | ||
|
|
||
| minimal-versions: | ||
| name: Minimal Versions | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@nightly | ||
|
|
||
| - name: Install minimal-versions | ||
| run: cargo install cargo-minimal-versions | ||
|
|
||
| - name: Check minimal versions | ||
| run: cargo minimal-versions check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| name: Documentation | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| paths: | ||
| - 'src/**' | ||
| - 'README.md' | ||
| - 'Cargo.toml' | ||
| - 'examples/**' | ||
| pull_request: | ||
| branches: [ main ] | ||
| paths: | ||
| - 'src/**' | ||
| - 'README.md' | ||
| - 'Cargo.toml' | ||
| - 'examples/**' | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
|
|
||
| jobs: | ||
| doc-tests: | ||
| name: Documentation Tests | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Cache cargo registry | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
| ~/.cargo/git | ||
| target | ||
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-cargo- | ||
|
|
||
| - name: Test documentation examples | ||
| run: cargo test --doc --all-features | ||
|
|
||
| - name: Build documentation | ||
| run: | | ||
| cargo doc --all-features --no-deps | ||
| # Check that docs build without warnings | ||
| cargo doc --all-features --no-deps 2>&1 | tee doc-warnings.txt | ||
| if grep -q "warning:" doc-warnings.txt; then | ||
| echo "Documentation has warnings!" | ||
| cat doc-warnings.txt | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Check README examples | ||
| run: | | ||
| # Extract and test code examples from README | ||
| echo "Checking README examples compile..." | ||
| # This is a basic check - in practice you might want more sophisticated validation | ||
|
|
||
| check-links: | ||
| name: Check Documentation Links | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Check links in README | ||
| uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
| with: | ||
| use-quiet-mode: 'yes' | ||
| use-verbose-mode: 'yes' | ||
| config-file: '.github/mlc_config.json' | ||
|
|
||
| validate-metadata: | ||
| name: Validate Package Metadata | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Check package metadata | ||
| run: | | ||
| # Verify all required metadata is present for crates.io | ||
| echo "Checking package metadata..." | ||
| cargo metadata --format-version 1 | jq -r '.packages[] | select(.name == "rust-guardian") | {name, version, description, license, repository, documentation, keywords, categories}' | ||
|
|
||
| # Verify the package can be packaged (list files) | ||
| cargo package --list --allow-dirty | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,160 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Release | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tags: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - 'v*' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CARGO_TERM_COLOR: always | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pre-release-checks: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Pre-release Checks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| outputs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| version: ${{ steps.get_version.outputs.version }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install Rust | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: dtolnay/rust-toolchain@stable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| components: rustfmt, clippy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Get version from tag | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id: get_version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Verify version matches Cargo.toml | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CARGO_VERSION=$(grep "^version = " Cargo.toml | sed 's/version = "\(.*\)"/\1/') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ "$CARGO_VERSION" != "${{ steps.get_version.outputs.version }}" ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Version mismatch: Cargo.toml has $CARGO_VERSION but tag is ${{ steps.get_version.outputs.version }}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Cache cargo registry | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/cache@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| path: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ~/.cargo/registry | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ~/.cargo/git | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| target | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| restore-keys: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ${{ runner.os }}-cargo- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Check formatting | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: cargo fmt --all -- --check | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Run clippy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: cargo clippy --all-targets --all-features -- -D warnings | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Build | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: cargo build --verbose --all-features | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Run tests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: cargo test --verbose --all-features | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Test CLI functionality | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cargo run -- --help | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cargo run -- check --help | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cargo run -- rules | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| publish-crates-io: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Publish to crates.io | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| needs: pre-release-checks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install Rust | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: dtolnay/rust-toolchain@stable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Cache cargo registry | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/cache@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| path: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ~/.cargo/registry | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ~/.cargo/git | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| target | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| restore-keys: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ${{ runner.os }}-cargo- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Publish to crates.io | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: cargo publish --token ${{ secrets.CRATES_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| create-github-release: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Create GitHub Release | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| needs: [pre-release-checks, publish-crates-io] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install Rust | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: dtolnay/rust-toolchain@stable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Build release binaries | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Build for different targets | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cargo build --release --all-features | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Create release directory | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mkdir -p release-artifacts | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Copy binary and create archive | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cp target/release/rust-guardian release-artifacts/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tar -czf release-artifacts/rust-guardian-${{ needs.pre-release-checks.outputs.version }}-x86_64-unknown-linux-gnu.tar.gz -C release-artifacts rust-guardian | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Generate checksums | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cd release-artifacts | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sha256sum * > checksums.txt | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Generate changelog | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id: changelog | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Try to get changelog from git log since last tag | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ -n "$PREVIOUS_TAG" ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "## Changes since $PREVIOUS_TAG" > CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git log --pretty=format:"- %s (%h)" ${PREVIOUS_TAG}..HEAD >> CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "## Release ${{ needs.pre-release-checks.outputs.version }}" > CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Initial release of rust-guardian" >> CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Add installation instructions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "" >> CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "## Installation" >> CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "" >> CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "\`\`\`bash" >> CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "cargo install rust-guardian" >> CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "\`\`\`" >> CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "" >> CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "## Documentation" >> CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "" >> CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "- [Crates.io](https://crates.io/crates/rust-guardian)" >> CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "- [Documentation](https://docs.rs/rust-guardian)" >> CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "- [Repository](https://github.com/cloudfunnels/rust-guardian)" >> CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Create Release | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: softprops/action-gh-release@v2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tag_name: v${{ needs.pre-release-checks.outputs.version }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Release v${{ needs.pre-release-checks.outputs.version }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| body_path: CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| body_path: CHANGELOG.md | |
| echo "## Changes since $PREVIOUS_TAG" > RELEASE_NOTES.md | |
| git log --pretty=format:"- %s (%h)" ${PREVIOUS_TAG}..HEAD >> RELEASE_NOTES.md | |
| else | |
| echo "## Release ${{ needs.pre-release-checks.outputs.version }}" > RELEASE_NOTES.md | |
| echo "Initial release of rust-guardian" >> RELEASE_NOTES.md | |
| fi | |
| # Add installation instructions | |
| echo "" >> RELEASE_NOTES.md | |
| echo "## Installation" >> RELEASE_NOTES.md | |
| echo "" >> RELEASE_NOTES.md | |
| echo "\`\`\`bash" >> RELEASE_NOTES.md | |
| echo "cargo install rust-guardian" >> RELEASE_NOTES.md | |
| echo "\`\`\`" >> RELEASE_NOTES.md | |
| echo "" >> RELEASE_NOTES.md | |
| echo "## Documentation" >> RELEASE_NOTES.md | |
| echo "" >> RELEASE_NOTES.md | |
| echo "- [Crates.io](https://crates.io/crates/rust-guardian)" >> RELEASE_NOTES.md | |
| echo "- [Documentation](https://docs.rs/rust-guardian)" >> RELEASE_NOTES.md | |
| echo "- [Repository](https://github.com/cloudfunnels/rust-guardian)" >> RELEASE_NOTES.md | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: v${{ needs.pre-release-checks.outputs.version }} | |
| name: Release v${{ needs.pre-release-checks.outputs.version }} | |
| body_path: RELEASE_NOTES.md |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The markdown link checker config file path should be referenced without quotes to ensure proper file resolution.