Add GitHub Actions workflows for automated crates.io publishing and CI/CD#5
Merged
Merged
Conversation
Co-authored-by: Theaxiom <57013+Theaxiom@users.noreply.github.com>
…hing Co-authored-by: Theaxiom <57013+Theaxiom@users.noreply.github.com>
Co-authored-by: Theaxiom <57013+Theaxiom@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Create the GitHub actions and other necessary automation to publish this to crates.io
Add GitHub Actions workflows for automated crates.io publishing and CI/CD
Aug 10, 2025
There was a problem hiding this comment.
Pull Request Overview
This PR implements comprehensive GitHub Actions automation to enable automated publishing of rust-guardian to crates.io and establish CI/CD pipelines for continuous integration quality checks.
- Adds three GitHub Actions workflows for CI testing, automated releases, and documentation validation
- Provides detailed setup and release documentation for maintainers
- Updates project changelog with release history and upcoming changes
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| SETUP.md | Complete setup guide for maintainers to configure crates.io API token |
| RELEASE.md | Comprehensive documentation of the automated release process |
| CHANGELOG.md | Updated changelog with workflow additions and improved structure |
| .github/workflows/release.yml | Automated release workflow with crates.io publishing and GitHub releases |
| .github/workflows/docs.yml | Documentation validation workflow with link checking |
| .github/workflows/ci.yml | CI pipeline with multi-version testing and security auditing |
| .github/mlc_config.json | Configuration for markdown link checker |
Comments suppressed due to low confidence (1)
CHANGELOG.md:54
- This '### Changed' section appears to be orphaned with no content following it, which creates inconsistent changelog structure. Either add content or remove the empty section.
### Features
| with: | ||
| use-quiet-mode: 'yes' | ||
| use-verbose-mode: 'yes' | ||
| config-file: '.github/mlc_config.json' |
There was a problem hiding this comment.
The markdown link checker config file path should be referenced without quotes to ensure proper file resolution.
Suggested change
| config-file: '.github/mlc_config.json' | |
| config-file: .github/mlc_config.json |
| with: | ||
| tag_name: v${{ needs.pre-release-checks.outputs.version }} | ||
| name: Release v${{ needs.pre-release-checks.outputs.version }} | ||
| body_path: CHANGELOG.md |
There was a problem hiding this comment.
Writing to CHANGELOG.md will overwrite the existing changelog file. This should write to a temporary file (e.g., RELEASE_NOTES.md) to avoid destroying the project's changelog history.
Suggested change
| 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 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR implements comprehensive GitHub Actions automation to publish rust-guardian to crates.io and ensure continuous integration quality checks.
What's Added
GitHub Actions Workflows
CI Workflow (
.github/workflows/ci.yml):cargo fmtcargo clippy(treats warnings as errors)cargo auditRelease Workflow (
.github/workflows/release.yml):v0.1.0)Cargo.tomlCRATES_TOKENsecretDocumentation Workflow (
.github/workflows/docs.yml):cargo test --docDocumentation & Setup
CRATES_TOKENsecretCrates.io Integration
The project is already well-configured for crates.io publishing:
Cargo.tomlcargo package --list)Usage
Once maintainers add the
CRATES_TOKENsecret (instructions inSETUP.md):# Trigger a release git tag v0.1.0 git push origin v0.1.0The automation will:
Verification
All workflows have been tested and validated:
Fixes #4.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.