This is a GitHub Action that installs and configures MacPorts on macOS runners.
- Node.js 24 or later
- npm
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/setup-macports.git - Navigate to the directory:
cd setup-macports - Install dependencies:
npm install
| Command | Description |
|---|---|
npm run build |
Build the action |
npm run format |
Format the code |
npm run format-check |
Check code formatting |
npm run lint |
Lint the code |
npm test |
Run tests |
npm run test:coverage |
Run tests with coverage |
npm run licensed-check |
Check licenses of dependencies |
npm run licensed-generate |
Generate license configuration |
npm run all |
Run all checks |
- Create a new branch:
git checkout -b my-new-feature - Make your changes
- Format your code:
npm run format - Check formatting:
npm run format-check - Lint your code:
npm run lint - Run tests:
npm test - Build the action:
npm run build - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Create a Pull Request
Tests are written using Vitest. Run npm test to execute the test suite.
To run tests with coverage, use npm run test:coverage.
This project uses:
Configuration files:
.prettierrc.json- Prettier configurationeslint.config.mjs- ESLint configuration
Releases are created using the release.yml workflow.
- Go to the Actions tab
- Select "Release" workflow
- Click "Run workflow"
- Enter the version (e.g.,
1.2.0) or leave empty to use package.json version - Select whether to create a GitHub Release
- Click "Run workflow"
The workflow will:
- Update the version in package.json (if specified)
- Run tests
- Build the action
- Commit the dist folder
- Create and push a git tag
- Create a GitHub Release (if enabled)
The scripts and documentation in this project are released under the MIT License.
Please open an issue on GitHub for bug reports, feature requests, or questions.