Thank you for your interest in contributing to FYI! This guide will help you get started.
-
Clone the repository
git clone https://github.com/chrisgreg/fyi.git cd fyi -
Install dependencies
mix deps.get
-
Run tests
mix test -
Check formatting
mix format --check-formatted
-
Create a branch for your changes
git checkout -b your-feature-name
-
Make your changes and write tests
-
Update the CHANGELOG
- Add your changes to the
[Unreleased]section inCHANGELOG.md - Use the existing format:
- **Feature name** - Description - Categorize under
### Added,### Changed,### Fixed, or### Removed
- Add your changes to the
-
Ensure tests pass and code is formatted
mix test mix format -
Commit your changes
git add . git commit -m "Add feature X"
-
Push and create a pull request
git push origin your-feature-name
Note: Only maintainers can create releases.
Releases are managed using semantic versioning (MAJOR.MINOR.PATCH):
- PATCH (1.0.1): Bug fixes, no breaking changes
- MINOR (1.1.0): New features, backwards compatible
- MAJOR (2.0.0): Breaking changes
-
Ensure you're on main with latest changes
git checkout main git pull origin main
-
Verify the CHANGELOG has an [Unreleased] section with changes
- Check that all changes since the last release are documented
- Ensure changes are categorized properly (Added/Changed/Fixed/Removed)
-
Run the release script
./scripts/release.sh patch # For bug fixes (1.0.0 -> 1.0.1) ./scripts/release.sh minor # For new features (1.0.0 -> 1.1.0) ./scripts/release.sh major # For breaking changes (1.0.0 -> 2.0.0)
The script will:
- Bump the version in
mix.exs - Move
[Unreleased]to the new version with today's date inCHANGELOG.md - Create a new empty
[Unreleased]section - Commit the changes
- Create a git tag (e.g.,
v1.0.1)
- Bump the version in
-
Review the changes
git show # Review the commit git show v1.0.1 # Review the tag
-
Push to GitHub (this triggers the publish workflow)
git push origin main --tags
-
GitHub Actions will automatically:
- Run the full test suite
- Publish the new version to Hex.pm (using the
HEX_API_KEYsecret)
If you need to undo a release before pushing:
git reset --hard HEAD~1 # Undo the commit
git tag -d v1.0.1 # Delete the tagIf you already pushed, you'll need to:
- Yank the version from Hex.pm if it was published
- Delete the tag from GitHub
- Revert the commit
The HEX_API_KEY secret must be configured in GitHub:
-
Generate a Hex API key:
mix hex.user key generate
-
Add it to GitHub:
- Go to repository Settings → Secrets and variables → Actions
- Click "New repository secret"
- Name:
HEX_API_KEY - Value: Your generated key
- Follow the existing code style
- Run
mix formatbefore committing - Write descriptive commit messages
- Add tests for new features
- Update documentation as needed
If you have questions or need help, feel free to:
- Open an issue
- Start a discussion
- Reach out to the maintainers
Thank you for contributing! 🎉