Skip to content

Help to deploy only some versions #68

Answered by webknjaz
kennylajara asked this question in Q&A
Discussion options

You must be logged in to vote

For this, create a separate step, analyze your version with Python, and set an output (see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter). Then, use that output in an if-clause later.

Here's an example job that runs before all the others, for inspiration: https://github.com/ansible/pylibssh/blob/45d2199/.github/workflows/build-test-n-publish.yml#L32-L148.

P.S. re: "I tried with the if you suggested but I couldn't deploy any package (tagged or not) when I added the if. This one" — this is because your clause expected the event to be push but your workflow only gets triggered on release so the conditional is never true.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by webknjaz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #65 on August 25, 2021 16:10.