Skip to content

Commit

Permalink
Get changes from main release.yml apply to publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
suprjinx committed Jul 13, 2023
1 parent e2131a1 commit 74c4b55
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ jobs:
# Anything else is invalid.
- name: Validate ref
run: |
ref=${{ github.event.workflow_run.head_branch }}
sha=${{ github.event.workflow_run.head_sha }}
ref='${{ github.event.workflow_run.head_branch }}'
sha='${{ github.event.workflow_run.head_sha }}'
case $ref in
main)
[ $(git branch --contains=$sha main | wc -l) -eq 1 ] &&
[ $(git rev-list --count $sha..main) -le 2 ]
;;
v?*)
[[ $ref =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] &&
[ $(git rev-parse refs/tags/$ref) == $sha ] &&
[ $(git branch --contains=$sha main | wc -l) -eq 1 ]
;;
Expand All @@ -49,7 +50,7 @@ jobs:
- name: Compute tags
id: tags
run: |
ref=${{ github.event.workflow_run.head_branch }}
ref='${{ github.event.workflow_run.head_branch }}'
case $ref in
main)
tags=("main" "edge")
Expand Down

0 comments on commit 74c4b55

Please sign in to comment.