PackagrIO
Packagr is a series of small, language-agnostic, dependency-free, composable tools that let you package and releaseartifacts and libraries written in any language.
Its goal is to bring automation to the packaging and deployment stage of your library release cycle.Packagr is incredibly flexible, and works best when implemented within a CI/CD pipeline (Github Actions, Jenkins, CircleCI, Travis, etc)
At first glance, it seems simple to publish a new library version. Just bump the version number and publish, right? Well, not always:
- If your library includes a Gemfile.lock, Berksfile.lock or other common lock files, you'll need to regenerate them as the old version number is embedded inside.
- Everyone runs their library unit tests before creating a new release (right?!), but what about validating that your library dependencies exist (maybe in your Company's private repo)?
- How about linting your source, to ensure that it follows common/team conventions?
- Who owns the gem? Is there one developer who has the credentials to push to RubyGems.org? Are they still on your team/on vacation?
- Did you remember to tag your source when the new version was created (making it easy to determine what's changed between versions?)
- Did you update your changelog?
Packagr handles all of that (and more!) for you. It pretty much guarantees that your library will have proper and consistent releases every time. Packagr is well structured, flexible and fully tested, unlike the release scripts you've manually cobbled together for each library and language. It can be customized as needed without rewriting from scratch. The best part is that Packagr uses Packagr to automate its releases. We dogfood it so we're the first ones to find any issues with a new release.
- Bumpr - is a tool to bump version files using SemVer. It natively understands metadata/version files for multiple languages and packaging specs.
- Releasr - is a tool for committing local changes & creating a tag. Natively understands metadata/version files for multiple languages, and will use the provided SemVer for tagging. (Nothing is pushed to the origin)
- Publishr - is a tool for publishing changes. It will push git changes to your SCM, uploads packages to your language package index (RubyGems/PyPi/Supermarket, etc). It will also create a Github Release with a Changelog & attached artifacts.
- Dependr -coming soon. a tool that will download your dependencies. Wraps native dependency managers, but provides consistent automation around lockfile management.
- Formattr -coming soon. a tool that will lint (and optionally format) your source code according to (customizable) language specific best-practices.
You can use Packagr to automate creating a new release from a pull request or from the latest code on your default branch.
The Packagr suite of tools is available via language-specific Github Actions. They are easy to drop into your existing build/release pipeline
name:Release# This workflow is triggered manuallyon:workflow_dispatch:inputs:version_bump_type:description:'Version Bump Type (major, minor, patch)'required:truedefault:'patch'jobs:build:name:Buildruns-on:ubuntu-latestcontainer:golang:1.18env:# GO projects are sensitive to the GOROOT/GOPATH, this variable is unnecessary for non-go builds.PROJECT_PATH:/go/src/github.com/my_username/my_reposteps: -name:Checkoutuses:actions/checkout@v2with:fetch-depth:0 -name:Bump versionid:bump_versionuses:packagrio/action-bumpr-go@masterenv:GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}with:version_bump_type:${{ github.event.inputs.version_bump_type }}github_token:${{ secrets.GITHUB_TOKEN }} -name:Buildenv:GOOS:linuxGOARCH:amd64run:| mkdir -p $PROJECT_PATH cp -a $GITHUB_WORKSPACE/. $PROJECT_PATH/ cd $PROJECT_PATH go mod vendor go test -mod vendor -v -tags "static" ./... go build -mod vendor -o my-app-linux-amd64 -tags "static" cmd/my_app/my_app.go chmod +x my-app-linux-amd64 # restore modified dir to GH workspace. cp -arf $PROJECT_PATH/. $GITHUB_WORKSPACE/ -name:Commit Changesid:commituses:packagrio/action-releasr-go@masterenv:# This is necessary in order to push a commit to the repoGITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}# Leave this line unchanged -name:Publish Releaseid:publishuses:packagrio/action-publishr-go@masterenv:# This is necessary in order to push a commit to the repoGITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}# Leave this line unchangedwith:upload_assets:'my-app-linux-amd64'
Here's how to usedocker to merge a pull request to your Ruby library
# git clone your repo, and checkout the branch specified in your PR.docker run --rm -it \-e PACKAGR_SCM_GITHUB_ACCESS_TOKEN=123456789ABCDEF \-e PACKAGR_SCM_PULL_REQUEST=4 \-e PACKAGR_SCM_REPO_FULL_NAME=AnalogJ/ruby_analogj_test \-e PACKAGR_RUBYGEMS_API_KEY=ASDF12345F \-v path/to/git/repoghcr.io/packagrio/packagr:latest-rubypackagr-bumpr start --scm github --package_type rubypackagr-releasr start --scm github --package_type rubypackagr-publishr start --scm github --package_type ruby# optionally attach the gem to your github release using '--upload-artifact='
Or you could download the latestbumpr,releasr andpublishr releases, and call them locally to merge a pull request to your Python library:
# git clone your repo, and checkout the branch specified in your PR.export PACKAGR_SCM_GITHUB_ACCESS_TOKEN=123456789ABCDEFexport PACKAGR_SCM_PULL_REQUEST=2export PACKAGR_SCM_REPO_FULL_NAME=AnalogJ/pypa_analogj_testexport PACKAGR_PYPI_USERNAME=AnalogJexport PACKAGR_PYPI_PASSWORD=mysupersecurepasswordpackagr-bumpr start --scm github --package_type python# use your own language specific testing tools as usualtoxpackagr-releasr start --scm github --package_type pythonpackagr-publishr start --scm github --package_type python
If you want to just create a new release from your master branch, don't set thePACKAGR_SCM_PULL_REQUEST andPACKAGR_SCM_REPO_FULL_NAME variables:
# git clone your repo, and checkout the master branchexport PACKAGR_SCM_GITHUB_ACCESS_TOKEN=123456789ABCDEFexport PACKAGR_PYPI_USERNAME=AnalogJexport PACKAGR_PYPI_PASSWORD=mysupersecurepasswordpackagr-bumpr start --scm github --package_type python# use your own language specific testing tools as usualtoxpackagr-releasr start --scm github --package_type pythonpackagr-publishr start --scm github --package_type python
If you'd like to help improve Packagr, follow the instructions inCONTRIBUTING.md
Note that if you would like to do development without Docker, you'll also need to ensure that you have thegit2go dependencies installed on your machine.You can install these dependencies by using your system's package manager.
- openssl- libgit2- libssh2Work your magic and then submit a pull request. We love pull requests!
If you find the documentation lacking, help us out and update this README.md.If you don't have the time to work on Packagr, but found something we should know about, please submit an issue.
We're actively looking for pull requests in the following areas:
- Packagr Engines for other languages
- C#
- Objective C
- Dash
- Java
- Lua
- Rust
- Scala
- Swift
- Any others you can think of
- Packagr SCM Sources
- GitLab
- Bitbucket
- Beanstalk
- Kiln
- Any others you can think of
We use SemVer for versioning. For the versions available, see the tags on this repository.
Jason Kulatunga - Initial Development -@AnalogJ
Packagr is licensed under the MIT License - see theLICENSE.md file for details
PinnedLoading
- docker-packagr
docker-packagr PublicPackagr Docker Images (build/development environments with pre-installed toolchains)
Dockerfile 2
Repositories
- releasr Public
Language agnostic tool to package a git repo. Commit any local changes and create a git tag. It should also generate artifacts. Nothing should be pushed to remote repository
Uh oh!
There was an error while loading.Please reload this page.
PackagrIO/releasr’s past year of commit activity - action-releasr-generic Public Forked fromPackagrIO/action-releasr-go
Github Action that allows you to commit local changes & tag Go repositories
Uh oh!
There was an error while loading.Please reload this page.
PackagrIO/action-releasr-generic’s past year of commit activity - publishr Public
Language agnostic tool to push changes to git repo, create release, attach artifacts, publish changelog
Uh oh!
There was an error while loading.Please reload this page.
PackagrIO/publishr’s past year of commit activity - action-bumpr-generic Public
Uh oh!
There was an error while loading.Please reload this page.
PackagrIO/action-bumpr-generic’s past year of commit activity - action-publishr-generic Public Forked fromPackagrIO/action-publishr-go
Github Action that allows you to push commits, publish artifacts, generate a changelog & create a releaseGithub Action that allows you to commit local changes & tag Go repositories
Uh oh!
There was an error while loading.Please reload this page.
PackagrIO/action-publishr-generic’s past year of commit activity - docker-packagr Public
Packagr Docker Images (build/development environments with pre-installed toolchains)
Uh oh!
There was an error while loading.Please reload this page.
PackagrIO/docker-packagr’s past year of commit activity Uh oh!
There was an error while loading.Please reload this page.
PackagrIO/bumpr’s past year of commit activity - gocli-template Public template
Uh oh!
There was an error while loading.Please reload this page.
PackagrIO/gocli-template’s past year of commit activity Uh oh!
There was an error while loading.Please reload this page.
PackagrIO/go-common’s past year of commit activity - .github Public
Uh oh!
There was an error while loading.Please reload this page.
PackagrIO/.github’s past year of commit activity
Top languages
Loading…
Uh oh!
There was an error while loading.Please reload this page.
Most used topics
Loading…
Uh oh!
There was an error while loading.Please reload this page.
