Conversation
Signed-off-by: Felix Breuer <fbreuer@pm.me>
yes, I saw the build stage skipped. |
Hi @breuerfelix As my understanding we need to execute this steps by hand: $ git commit --allow-empty -m "Publishing the release <release>"
$ git tag -a <release> -m "Version <version>"
$ git push --tags then, the pipeline will be triggered, but this time the PyPi part is being executed since we have a new tag; I think that we could use this block instead: name: PyPi
on:
push:
# <== Here comments can be removed
branches: [master] # Master is ok, we only bump versions in master
jobs:
build:
runs-on: ubuntu-latest
name: Deploy to PyPi
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install build dependencies and requirements
run: |
pip install --upgrade pip sdist wheel
pip install -r requirements.txt
- name: Build the package
run: python setup.py sdist bdist_wheel
- name: Publish package
# <== Here
# comments can be removed
# github.repository == 'timgrossmann/InstaPy' protects from fork projects
# github.event_name == 'push' in push to master
if: github.repository == 'timgrossmann/InstaPy' && github.event_name == 'push')
uses: pypa/gh-action-pypi-publish@master # <== Here Using master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }} |
|
@elulcao well i tested the change i made this time on a fork and had a look if it triggers on a tag and everything works :) if we would do it like you suggested, it would try to publish the package everytime we push a change on master -> it would fail since we already published version x. https://github.com/breuerfelix/InstaPy/runs/3935835018?check_suite_focus=true -> that is the run on my fork! it only failed because i have no token but it triggered when i tagged the repo :) |
... we need to go another round :D the pipeline was not triggered when i tagged the repo
@elulcao