* Build master and stable branches * Updated README.md * Added github action to publish package * Updated python to 3.8.2-r1 for docker images * poetry update * 0.0.2a2 * Hotfix: Build latest docker image from Dockerfile.dev
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- stable
|
|
|
|
jobs:
|
|
prepare:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- prepare
|
|
steps:
|
|
- name: Set up Python 3.8
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.8
|
|
|
|
- name: Install poetry
|
|
run: |
|
|
pip install poetry
|
|
|
|
- name: Build and publish
|
|
run: |
|
|
poetry publish -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} --build
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- prepare
|
|
- publish
|
|
steps:
|
|
- name: Build the Docker image
|
|
run: docker build --tag butterrobot:$(git rev-parse --short HEAD) docker
|
|
|
|
- name: Push into Github packages (stable)
|
|
run: |
|
|
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u fmartingr --password-stdin
|
|
docker tag butterrobot:$(git rev-parse --short HEAD) docker.pkg.github.com/fmartingr/butterrobot/butterrobot:stable
|
|
docker tag butterrobot:$(git rev-parse --short HEAD) docker.pkg.github.com/fmartingr/butterrobot/butterrobot:$(cat pyproject.toml | grep version | cut -d "\"" -f 2)
|
|
docker push docker.pkg.github.com/fmartingr/butterrobot/butterrobot:stable
|
|
docker push docker.pkg.github.com/fmartingr/butterrobot/butterrobot:$(cat pyproject.toml | grep version | cut -d "\"" -f 2)
|