Skip to content

Make CI Release

Make CI Release #81

Workflow file for this run

name: "Make CI Release"
on:
workflow_dispatch:
inputs:
ci-run-id:
description: "Run ID of CI workflow"
required: false
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download artifacts for last successful CI workflow
if: ${{ !github.event.inputs.ci-run-id }}
uses: dawidd6/action-download-artifact@v2
with:
workflow: ci-build.yml
workflow_conclusion: success
- name: Download artifacts for CI workflow with provided run id
if: ${{ github.event.inputs.ci-run-id }}
uses: dawidd6/action-download-artifact@v2
with:
workflow: ci-build.yml
run_id: ${{ github.event.inputs.ci-run-id }}
- name: Initialize version
run: echo "KLOGG_VERSION=`cat klogg_version/klogg_version.txt`" >> $GITHUB_ENV
- name: Display structure of downloaded files
run: ls -R ./packages-*
- name: Setup Sentry CLI
uses: mathrix-education/[email protected]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
with:
token: ${{ secrets.SENTRY_TOKEN }}
organization: anton-filimonov
project: klogg
- name: Create Sentry release
shell: sh
run: |
sentry-cli releases new $KLOGG_VERSION
sentry-cli releases set-commits --auto $KLOGG_VERSION
- name: Upload symbols linux
shell: sh
run: |
xz -d ./packages-focal/klogg_focal.debug.xz
xz -d ./packages-jammy/klogg_jammy.debug.xz
xz -d ./packages-noble/klogg_noble.debug.xz
xz -d ./packages-oracle/klogg_oracle.debug.xz
xz -d ./packages-appimage/klogg_appimage.debug.xz
sentry-cli upload-dif ./packages-focal/klogg_focal.debug ./packages-focal/klogg_focal
sentry-cli upload-dif ./packages-jammy/klogg_jammy.debug ./packages-jammy/klogg_jammy
sentry-cli upload-dif ./packages-noble/klogg_noble.debug ./packages-noble/klogg_noble
sentry-cli upload-dif ./packages-oracle/klogg_oracle.debug ./packages-oracle/klogg_oracle
sentry-cli upload-dif ./packages-appimage/klogg_appimage.debug ./packages-appimage/klogg_appimage
- name: Upload symbols mac
shell: sh
run: |
sentry-cli upload-dif ./packages-macos-intel-qt6/klogg-x64.app/Contents/MacOS/klogg ./packages-macos-intel-qt6/klogg-x64.dSym
sentry-cli upload-dif ./packages-macos-arm-qt6/klogg-arm64.app/Contents/MacOS/klogg ./packages-macos-arm-qt6/klogg-arm64.dSym
- name: Upload symbols win
shell: sh
run: |
sentry-cli upload-dif ./packages-windows-x86-qt5/klogg-$KLOGG_VERSION-x86-Qt5-pdb.zip
sentry-cli upload-dif ./packages-windows-x64-qt6/klogg-$KLOGG_VERSION-x64-Qt6-pdb.zip
- name: Cleanup release artifacts
shell: sh
run: |
rm -rf ./packages-focal/klogg_focal
rm -rf ./packages-jammy/klogg_jammy
rm -rf ./packages-noble/klogg_noble
rm -rf ./packages-oracle/klogg_oracle
rm -rf ./packages-appimage/klogg_appimage
rm -rf ./packages-macos-intel-qt6/klogg-x64.app
rm -rf ./packages-macos-arm-qt6/klogg-arm64.app
mkdir ./linux-debug
mv ./packages-focal/klogg_focal.debug ./linux-debug
mv ./packages-jammy/klogg_jammy.debug ./linux-debug
mv ./packages-noble/klogg_noble.debug ./linux-debug
mv ./packages-oracle/klogg_oracle.debug ./linux-debug
mv ./packages-appimage/klogg_appimage.debug ./linux-debug
tar -cJf ./linux-debug/klogg-$KLOGG_VERSION-symbols.tar.xz ./linux-debug/*
rm ./linux-debug/*.debug
- name: Prepare binary artifacts
shell: sh
run: |
mkdir ./packages-bin
mv ./packages-appimage/klogg_deps.tar.xz ./packages-bin/klogg-$KLOGG_VERSION-deps.tar.xz
ar p ./packages-focal/klogg-$KLOGG_VERSION-focal.deb data.tar.gz > ./packages-bin/klogg-$KLOGG_VERSION-bin.tar.gz
mv ./klogg_version/klogg_version.txt ./packages-bin
- name: Prepare checksums
shell: sh
run: |
sha256sum --binary ./packages-bin/* ./packages-focal/* ./packages-jammy/* ./packages-noble/* ./packages-oracle/* ./packages-appimage/* > ./packages-bin/klogg-$KLOGG_VERSION-sha256.txt
- name: Release win
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: ${{ secrets.KLOGG_GITHUB_TOKEN }}
automatic_release_tag: continuous-win
prerelease: true
files: |
./packages-windows-x86-qt5/*
./packages-windows-x64-qt6/*
- name: Release linux
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: ${{ secrets.KLOGG_GITHUB_TOKEN }}
automatic_release_tag: continuous-linux
prerelease: true
files: |
./packages-focal/*
./packages-jammy/*
./packages-noble/*
./packages-oracle/*
./packages-appimage/*
./packages-bin/*
./linux-debug/*
- name: Release mac
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: ${{ secrets.KLOGG_GITHUB_TOKEN }}
automatic_release_tag: continuous-osx
prerelease: true
files: |
./packages-macos-intel-qt6/*
./packages-macos-arm-qt6/*
- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_NEW_VERSIONS_WEBHOOK }}
DISCORD_EMBEDS: '[{"title": "Windows", "url": "https://github.com/variar/klogg/releases/tag/continuous-win"}, {"title": "Linux", "url": "https://github.com/variar/klogg/releases/tag/continuous-linux"}, {"title": "Mac", "url": "https://github.com/variar/klogg/releases/tag/continuous-osx"}]'
uses: Ilshidur/action-discord@master
with:
args: 'New CI build {{KLOGG_VERSION}} has been released!'