name: test-publish
on: [push]
jobs:
test:
strategy:
...
steps:
...
publish:
needs: test
if: github.event_name == 'push' && github.ref???
steps:
... # eg: publish package to PyPI
What should I put in jobs.publish.if in order to check that this commit is new release?
Is this okay: contains(github.ref, '/tags/')?
What will happen if I push code and tag at the same time?