1919 sed -i "" "s/\(static let version = \"\).*\(\"\)/\1${TAG}\2/" Sources/rswift/Rswift.swift
2020 env :
2121 TAG : ${{ github.event.release.tag_name }}
22-
22+ - name : Tarball updated source
23+ run : |
24+ git archive --format=tar.gz -o $TARGET $TAG_NAME
25+ env :
26+ TAG_NAME : ${{ github.event.release.tag_name }}
27+ TARGET : ${{ runner.temp }}/Sources.tar.gz
2328 - name : Build
2429 run : swift build -v -c release
2530 - name : Import Application Siging
7883 asset_name : rswift-${{ github.event.release.tag_name }}.pkg
7984 asset_content_type : application/pkg
8085
86+ - name : Upload sources tarball
87+ uses : actions/upload-release-asset@v1
88+ env :
89+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
90+ with :
91+ upload_url : ${{ github.event.release.upload_url }}
92+ asset_path : ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.pkg
93+ asset_name : rswift-${{ github.event.release.tag_name }}.pkg
94+ asset_content_type : application/pkg
95+
8196 - name : Store artifact binary
8297 uses : actions/upload-artifact@v1
8398 with :
@@ -101,3 +116,9 @@ jobs:
101116 env :
102117 TAG_NAME : ${{ github.event.release.tag_name }}
103118 COCOAPODS_TRUNK_TOKEN : ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
119+
120+ - name : Publish to homebrew
121+ run : brew bump-formula-pr --tag $TAG_NAME --revision $REVISION rswift || exit 0
122+ env :
123+ TAG_NAME : ${{ github.event.release.tag_name }}
124+ REVISION : ${{ github.sha }}
0 commit comments