Skip to content

Commit

Permalink
added tagged-release github action for automated release creation
Browse files Browse the repository at this point in the history
- updated version in setup.py
- included release instructions in readme
  • Loading branch information
Sparrow0hawk committed Sep 30, 2020
1 parent 6c34f8c commit 1620c6e
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/tagged-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# this action automates the process of creating a github release
#
# you can prompt this action by creating a git tag that follows semantic versioning (https://semver.org/) major.minor.patch
# e.g. in command line: git tag -a v0.1.2 -m 'tag comment about tag'
# you'll then need to do `git push --tags` to push the tag refs to github
# this action will then run

name: "tagged-release"

on:
push:
tags:
- v*

jobs:
tagged-release:
name: "Tagged Release"
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v2
- uses: goanpeca/setup-miniconda@v1
with:
environment-file: environment.yml
python-version: 3.8
auto-activate-base: false
activate-environment: ramp-ua

- name: install package and test
shell: bash -l {0}
run: |
python setup.py install
pytest
echo "Tests complete"
- name: create sdist
shell: bash -l {0}
run: |
python setup.py sdist
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
dist/*.tar.gz
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,18 @@ $ python microsim/microsim_model.py
Outputs are written to the [microsim/data/outputs](./microsim/data/outputs) directory.

For more details, see the full project repository on OSF.IO: https://osf.io/qzw6f/ (currently this is private, sorry, while we work out which data sources can be shared and which can't be, but the whole project will become public asap).

## Creating releases

This repository takes advantage of a GitHub action for [creating tagged releases](https://github.com/marvinpinto/action-automatic-releases) using [semantic versioning](https://semver.org/).

To initiate the GitHub action and create a release:

```bash
$ git checkout branch

$ git tag -a v0.1.2 -m 'tag comment about release'

$ git push --tags
```
Once pushed the action will initiate and attempt to create a release.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="RAMP-UA",
version="0.2.1dev",
version="0.3.0dev",
author="RAMP UA Team",
author_email="[email protected]",
description="The RAMP Urban Analytics package",
Expand Down

0 comments on commit 1620c6e

Please sign in to comment.