Skip to content

Fiddle: update dependencies and add targets to scripts (#23) #29

Fiddle: update dependencies and add targets to scripts (#23)

Fiddle: update dependencies and add targets to scripts (#23) #29

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
jobs:
deploy-package-next:
runs-on: ubuntu-latest
env:
DOCKER_IMAGE: package
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
steps:
- name: Check out the repo
uses: actions/checkout@v2
with:
# NOTE(krishan711): need full history to calculate difference
fetch-depth: 0
- name: Build docker image
run: docker build --tag $DOCKER_IMAGE .
- name: Calculate commit count since last tag
id: vars
run: echo ::set-output name=commit_count::$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
- name: Create .pypirc file
run: echo -e "[pypi]\nusername=__token__\npassword=$PYPI_TOKEN" > .pypirc
- name: Publish next package to pypi
if: steps.vars.outputs.commit_count != '0'
run: |
docker run -v $(pwd)/.pypirc:/root/.pypirc $DOCKER_IMAGE /bin/bash -c " \
python buildpy/version.py --part dev --count ${{ steps.vars.outputs.commit_count }} \
&& python setup.py bdist_wheel \
&& twine upload --non-interactive --disable-progress-bar dist/* \
"