3535 name : " ${{ env.VERSION }}"
3636 draft : true
3737 prerelease : false
38+ generate_release_notes : true
3839
3940 build-macos :
4041 uses : ./.github/workflows/template-build-macos.yml
@@ -79,26 +80,47 @@ jobs:
7980 upload_url : ${{ needs.create-draft-release.outputs.upload_url }}
8081 cortex-llamacpp-version : ${{ needs.get-cortex-llamacpp-latest-version.outputs.cortex_llamacpp_latest_version }}
8182
82- update_release_draft :
83- needs : [build-macos, build-windows-x64, build-linux-x64]
83+ update_release :
84+ needs : [get-update-version, create-draft-release, build-macos, build-windows-x64, build-linux-x64]
85+ permissions :
86+ # write permission is required to create a github release
87+ contents : write
88+ # write permission is required for autolabeler
89+ # otherwise, read permission is required at least
90+ pull-requests : write
91+ runs-on : ubuntu-latest
92+ steps :
93+ - name : set release to prerelease
94+ run : |
95+ gh release edit v${{ needs.get-update-version.outputs.new_version }} --draft=false --prerelease
96+ env:
97+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98+
99+ noti-discord :
100+ needs : [get-update-version, create-draft-release, build-macos, build-windows-x64, build-linux-x64, update_release]
101+ runs-on : ubuntu-latest
84102 permissions :
85- # write permission is required to create a github release
86103 contents : write
87- # write permission is required for autolabeler
88- # otherwise, read permission is required at least
89- pull-requests : write
90- runs-on : ubuntu-latest
91104 steps :
92- # (Optional) GitHub Enterprise requires GHE_HOST variable set
93- # - name: Set GHE_HOST
94- # run: |
95- # echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/} " >> $GITHUB_ENV
105+ - name : Set version to environment variable
106+ run : |
107+ echo "VERSION=${{ needs.get-update-version.outputs.new_version }}" >> $GITHUB_ENV
108+ echo "RUNNER_ID=$GITHUB_RUN_ID " >> $GITHUB_ENV
96109
97- # Drafts your next Release notes as Pull Requests are merged into "master"
98- - uses : release-drafter/release-drafter@v5
99- # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
100- # with:
101- # config-name: my-config.yml
102- # disable-autolabeler: true
103- env :
104- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
110+ - name : Notify Discord
111+ uses : appleboy/discord-action@v1.0.0
112+ with :
113+ webhook_id : ${{ secrets.WEBHOOK_ID_BETA }}
114+ webhook_token : ${{ secrets.WEBHOOK_TOKEN_BETA }}
115+ message : |
116+ Cortex.cpp beta build artifact version ${{ env.VERSION }}:
117+ - Windows:
118+ - Network Installer: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-windows-amd64-network-installer.exe
119+ - Local Installer: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-windows-amd64-local-installer.exe
120+ - macOS Universal:
121+ - Network Installer: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-mac-universal-network-installer.pkg
122+ - Local Installer: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-mac-universal-local-installer.pkg
123+ - Linux Deb:
124+ - Network Installer: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-linux-amd64-network-installer.deb
125+ - Local Installer: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-linux-amd64-local-installer.deb
126+ - Github Release: https://github.com/janhq/cortex.cpp/releases/tag/v${{ env.VERSION }}
0 commit comments