4343 runs-on : macos-latest
4444 steps :
4545 - uses : actions/checkout@v2
46+ with :
47+ fetch-depth : 0
4648 - name : Get Release Version
4749 run : |
4850 echo GITHUB_REF=$GITHUB_REF
@@ -103,13 +105,12 @@ jobs:
103105 cat $HOME/tera.rb
104106
105107 - name : Update Homebrew Formula
106- if : github.ref == 'refs/heads/master'
107108 run : |
108109 cp -f $HOME/tera.rb Formula/tera.rb
109110 git config --global user.name 'TeraBot'
110111 git config --global user.email 'chevdor@users.noreply.github.com'
111112 git commit Formula/tera.rb -m "build: new homebrew formula for ${{ env.RELEASE_VERSION }}"
112- git push
113+ git push origin HEAD:master
113114
114115 create_draft :
115116 needs : ["linux", "macos"]
@@ -149,9 +150,8 @@ jobs:
149150
150151 - name : Render release notes
151152 run : |
152- export DEBIAN_URL="https://github.com/chevdor/tera-cli/releases/download/${{ env.RELEASE_VERSION }}/linux/tera-cli_linux_amd64.deb"
153- export MACOS_TGZ_URL="https://github.com/chevdor/tera-cli/releases/download/${{ env.RELEASE_VERSION }}/macos/tera-macos-${{ env.RELEASE_VERSION }}.tar.gz"
154- export MACOS_BIN_URL="https://github.com/chevdor/tera-cli/releases/download/${{ env.RELEASE_VERSION }}/macos/tera-macos-${{ env.RELEASE_VERSION }}"
153+ export DEBIAN_URL="https://github.com/chevdor/tera-cli/releases/download/${{ env.RELEASE_VERSION }}/tera-cli_linux_amd64.deb"
154+ export MACOS_TGZ_URL="https://github.com/chevdor/tera-cli/releases/download/${{ env.RELEASE_VERSION }}/tera-macos-${{ env.RELEASE_VERSION }}.tar.gz"
155155 export CHANGELOG=$(cat changelog.md)
156156 tera --env --env-only --template templates/release.md > RELEASE_NOTES.md
157157
@@ -178,7 +178,7 @@ jobs:
178178
179179 - uses : actions/download-artifact@v2
180180
181- - name : Upload binaries
181+ - name : Upload Debian package
182182 uses : actions/upload-release-asset@v1
183183 env :
184184 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -187,3 +187,13 @@ jobs:
187187 asset_path : " linux/tera-cli_linux_amd64.deb"
188188 asset_name : " tera-cli_linux_amd64.deb"
189189 asset_content_type : application/vnd.debian.binary-package
190+
191+ - name : Upload MacOS archive
192+ uses : actions/upload-release-asset@v1
193+ env :
194+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
195+ with :
196+ upload_url : ${{ needs.create_draft.outputs.asset_upload_url }}
197+ asset_path : " macos/tera-macos-${{ env.RELEASE_VERSION }}.tar.gz"
198+ asset_name : " tera-macos-${{ env.RELEASE_VERSION }}.tar.gz"
199+ asset_content_type : application/gzip
0 commit comments