v0.11.3_AVX #93
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- '**' | |
tags: | |
- '**' | |
# schedule: | |
# - cron: "0 4 * * *" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | |
cancel-in-progress: true | |
env: | |
CMAKE_BUILD_PRESET: "windows-default" | |
MMX_VERSION: ${{ github.ref_name }} | |
MMX_WIN_PACK: "TRUE" | |
MMX_TELEGRAM_TOKEN: ${{ secrets.MMX_TELEGRAM_TOKEN }} | |
MMX_TELEGRAM_TO_1: ${{ secrets.MMX_TELEGRAM_TO_1 }} | |
MMX_TELEGRAM_TO_2: ${{ secrets.MMX_TELEGRAM_TO_2 }} | |
DISCORD_WEBHOOK: ${{ secrets.MMX_DISCORD_WEBHOOK }} | |
jobs: | |
msvc: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- uses: lukka/get-cmake@latest | |
- name: Restore artifacts, or setup vcpkg (do not install any package) | |
uses: lukka/run-vcpkg@v11 | |
- name: Run CMake consuming CMakePreset.json and vcpkg.json by mean of vcpkg. | |
uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: ${{ env.CMAKE_BUILD_PRESET }} | |
buildPreset: ${{ env.CMAKE_BUILD_PRESET }} | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "build" | |
path: ./build/${{ env.CMAKE_BUILD_PRESET }}/!bin/Release/ | |
- name: Run CPack | |
run: cpack -C Release --config build/${{ env.CMAKE_BUILD_PRESET }}/CPackConfig.cmake -B build/${{ env.CMAKE_BUILD_PRESET }}/!package | |
- name: Zip files | |
run: Get-ChildItem "./build/${{ env.CMAKE_BUILD_PRESET }}/!package" -Filter *.exe | Foreach-Object { 7z a ( (Convert-Path $_.PSParentPath) + "\" + $_.BaseName + ".zip") $_.FullName } | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "package" | |
path: ./build/${{ env.CMAKE_BUILD_PRESET }}/!package/*.exe | |
- name: Upload a Build Artifact to release | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./build/${{ env.CMAKE_BUILD_PRESET }}/!package/*.zip | |
file_glob: true | |
tag: ${{ github.ref }} | |
overwrite: true | |
notify: | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
needs: [msvc] | |
steps: | |
- name: Get the version | |
id: get_version | |
run: echo VERSION=$(echo $GITHUB_REF | cut -d / -f 3) >> $GITHUB_OUTPUT | |
- name: Telegram notification | |
if: ${{ env.MMX_TELEGRAM_TO_1 != '' }} && ${{ env.MMX_TELEGRAM_TOKEN != '' }} | |
uses: appleboy/telegram-action@master | |
with: | |
to: ${{ env.MMX_TELEGRAM_TO_1 }} | |
token: ${{ env.MMX_TELEGRAM_TOKEN }} | |
format: html | |
message: | | |
MMX Node release ${{ steps.get_version.outputs.VERSION }} | |
${{ github.event.repository.url }}/releases/${{ steps.get_version.outputs.VERSION }} | |
<a href="https://t.me/mmx_node">Telegram channel</a> | |
<a href="https://t.me/mmx_node_chat">Telegram chat</a> | |
<a href="https://t.me/mmx_node_chat_ru">Telegram chat[RU]</a> | |
<a href="https://discord.gg/tCwevssVmY">Discord</a> | |
- name: Telegram notification | |
if: ${{ env.MMX_TELEGRAM_TO_2 != '' }} && ${{ env.MMX_TELEGRAM_TOKEN != '' }} | |
uses: appleboy/telegram-action@master | |
with: | |
to: ${{ env.MMX_TELEGRAM_TO_2 }} | |
token: ${{ env.MMX_TELEGRAM_TOKEN }} | |
format: html | |
message: | | |
MMX Node release ${{ steps.get_version.outputs.VERSION }} | |
${{ github.event.repository.url }}/releases/${{ steps.get_version.outputs.VERSION }} | |
<a href="https://t.me/mmx_node">Telegram channel</a> | |
<a href="https://t.me/mmx_node_chat">Telegram chat</a> | |
<a href="https://t.me/mmx_node_chat_ru">Telegram chat[RU]</a> | |
<a href="https://discord.gg/tCwevssVmY">Discord</a> | |
- name: Discord notification | |
if: ${{ env.DISCORD_WEBHOOK != '' }} | |
uses: Ilshidur/action-discord@master | |
with: | |
args: | | |
MMX Node release ${{ steps.get_version.outputs.VERSION }} | |
${{ github.event.repository.url }}/releases/${{ steps.get_version.outputs.VERSION }} |