name: Release on: push: tags: - '*' jobs: build: if: github.repository == 'django-q2/django-q2' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v2 with: python-version: 3.8 - name: Install dependencies run: | sudo apt-get update sudo apt-get -y install gettext python -m pip install pip setuptools django poetry # compile messages to get .mo files django-admin compilemessages - name: Build and publish package if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') run: poetry --build --username=__token__ --password=${{ secrets.PYPI_TOKEN }} publish