Skip to content
This repository has been archived by the owner on Mar 28, 2021. It is now read-only.
/ release.py Public archive

a kiss solution to easily create project releases

License

Notifications You must be signed in to change notification settings

e-graveyard/release.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

release.py

A KISS solution to easily create project releases.

Build Status Code Coverage Code Quality

  • Minimal. No 3rd-party dependency is necessary, only Python 3.x.
  • Simple. All required parameters are automagically detected.
  • Language agnostic. Create releases for projects written in any language.
  • CI/CD ready. Easily integratable in CI/CD pipelines.

Table of Contents

How It Works?

release.py is a tool that generates releases on GitHub. It should be used in the context of a CI/CD pipeline, at the delivery stage. The pipeline should be declared in a way that, when a new tag is pushed, release.py is executed after the tests passed, so a new release is automatically created with the changelog since the last tag.

An example of a Travis-CI pipeline using stages and release.py:

sudo: required
language: node_js

stages:
  - test
  - release

jobs:
  include:
    - stage: test
      name: "Unit tests"
      install:
        - npm install
      script:
        - npm test

    - stage: release
      name: "Create new release"
      script:
        - curl -fsSL https://git.io/fjOZZ | python3
      if: tag IS present

The tool lists all the tags for the project and compare the changes from the last tag to the current one -- If no last tag is detected, it will use the master branch as the last reference. It then formats the log to an HTML changelog and posts to the GitHub API. The username, repository name, connection protocol (HTTPS or SSH) and provider (GitHub or others) detection is based upon the remote URL of the repository.

Via CLI, one or more artifacts can be attached to the release. A release message can also be defined (optionally). The API authentication to either GitHub is made by tokens. The token should be generated for you account and exposed inside the pipeline via the RELEASEPY_AUTH_TOKEN environment variable.

Requirements

release.py only requires Python 3 (version 3.6 or higher).

Usage

curl -fsSL https://git.io/fjOZZ | python3

Attaching Artifacts

TODO

License

To the extent possible under law, Caian Rais Ertl has waived all copyright and related or neighboring rights to this work.

License

Acknowledgements

release.py is highly inspired (by functionality or implementation) on these projects/scripts:

Icons made by Icongeek26 from Flaticon is licensed by CC 3.0 BY.

About

a kiss solution to easily create project releases

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages