Skip to content

Commit 643e98c

Browse files
authored
Merge pull request #392 from pusher/fix-release-tagging
Fix release tagging
2 parents ff7aa75 + fc55f81 commit 643e98c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,13 @@ jobs:
4848
-scheme PusherSwift \
4949
build \
5050
| xcpretty --color
51+
outputs:
52+
tag: ${{ needs.check-release-tag.outputs.tag }}
5153

5254
publish-cocoapods:
5355
runs-on: ubuntu-latest
5456
needs: build
57+
if: ${{ needs.build.outputs.tag }}
5558
steps:
5659
- uses: actions/checkout@v2
5760
- uses: ruby/setup-ruby@v1
@@ -60,23 +63,25 @@ jobs:
6063
- run: |
6164
gem install cocoapods
6265
63-
git tag -a ${{ needs.check-release-tag.outputs.tag }} -m "${{ needs.check-release-tag.outputs.tag }}"
64-
git push origin ${{ needs.check-release-tag.outputs.tag }}
66+
git tag -a ${{ needs.build.outputs.tag }} -m "${{ needs.build.outputs.tag }}"
67+
git push origin ${{ needs.build.outputs.tag }}
6568
6669
pod trunk push PusherSwift.podspec
6770
pod trunk push PusherSwiftWithEncryption.podspec
6871
env:
6972
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TOKEN }}
73+
outputs:
74+
release_version: ${{ ${{ needs.build.outputs.tag }} }}
7075

7176
create-github-release:
7277
runs-on: ubuntu-latest
7378
needs: publish-cocoapods
74-
if: ${{ needs.check-release-tag.outputs.tag }}
79+
if: ${{ needs.publish-cocoapods.outputs.release_version }}
7580
steps:
7681
- uses: actions/checkout@v2
7782
- name: Prepare tag
7883
run: |
79-
export TAG=${{ needs.check-release-tag.outputs.tag }}
84+
export TAG=${{ needs.publish-cocoapods.outputs.release_version }}
8085
echo "TAG=$TAG" >> $GITHUB_ENV
8186
- name: Setup git
8287
run: |

0 commit comments

Comments
 (0)