Skip to content

Commit

Permalink
CI: Update Windows release packaging process
Browse files Browse the repository at this point in the history
- Uses split workflows for packaging and delta updates
- Includes windows artifacts in draft release
  • Loading branch information
derrod committed Apr 17, 2024
1 parent 71aa566 commit e785929
Showing 1 changed file with 30 additions and 4 deletions.
34 changes: 30 additions & 4 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,21 +205,35 @@ jobs:
pattern: macos-sparkle-update-*
delete-merged: true

sign-windows-build:
package-windows-build:
name: Windows Signing ✍️
uses: obsproject/obs-studio/.github/workflows/sign-windows.yaml@ffd5879ec95f09e4e551b839f5fe6738058231c1
uses: obsproject/obs-studio/.github/workflows/sign-windows.yaml@71aa5662fced3e6158b48e3938b9e62023a2c2eb
if: github.repository_owner == 'obsproject' && github.ref_type == 'tag'
needs: build-project
permissions:
contents: 'read'
id-token: 'write'
secrets: inherit
with:
step: package

create-windows-updates:
needs: package-windows-build
name: Windows Update Packages ✍️
uses: obsproject/obs-studio/.github/workflows/sign-windows.yaml@71aa5662fced3e6158b48e3938b9e62023a2c2eb
if: github.repository_owner == 'obsproject' && github.ref_type == 'tag'
permissions:
contents: 'read'
id-token: 'write'
secrets: inherit
with:
step: updater

create-release:
name: Create Release 🛫
if: github.ref_type == 'tag'
runs-on: ubuntu-22.04
needs: build-project
needs: [build-project, package-windows-build]
defaults:
run:
shell: bash
Expand Down Expand Up @@ -265,6 +279,9 @@ jobs:
ubuntu_x86_64_artifact_name="obs-studio-ubuntu-22.04-x86_64-${commit_hash}"
ubuntu_x86_64_debug_name="obs-studio-ubuntu-22.04-x86_64-${commit_hash}-dbgsym"
ubuntu_sources_name="obs-studio-ubuntu-22.04-sources-${commit_hash}"
windows_artifact_name="obs-studio-windows-x64-${{ steps.check.outputs.version }}-signed"
windows_installer_name="obs-studio-windows-x64-${{ steps.check.outputs.version }}-installer"
windows_debug_name="obs-studio-windows-x64-${{ steps.check.outputs.version }}-pdbs"
echo '::group::Renaming Artifacts'
mv -v "${macos_arm64_artifact_name}/"obs-studio-*-macos-apple.dmg \
Expand All @@ -281,6 +298,13 @@ jobs:
"${root_dir}"/OBS-Studio-${{ steps.check.outputs.version }}-Ubuntu-x86_64-dbsym.ddeb
mv -v "${ubuntu_sources_name}/"obs-studio-*-sources.tar.gz \
"${root_dir}"/OBS-Studio-${{ steps.check.outputs.version }}-Sources.tar.gz
mv -v "${windows_installer_name}/"OBS-Studio-*-x64.exe \
"${root_dir}"/OBS-Studio-${{ steps.check.outputs.version }}-Windows-x64-Installer.exe
echo '::endgroup::'
echo '::group::Zipping Windows Artifacts'
zip -r6 "${root_dir}"/OBS-Studio-${{ steps.check.outputs.version }}-Windows-x64.zip "${windows_artifact_name}/"
zip -r9 "${root_dir}"/OBS-Studio-${{ steps.check.outputs.version }}-Windows-x64-PDBs.zip "${windows_debug_name}/"
echo '::endgroup::'
- name: Generate Checksums 🪪
Expand All @@ -291,7 +315,7 @@ jobs:
shopt -s extglob
echo "### Checksums" > ${{ github.workspace }}/CHECKSUMS.txt
for file in ${{ github.workspace }}/@(*.deb|*.ddeb|*.dmg|*.tar.xz|*.tar.gz); do
for file in ${{ github.workspace }}/@(*.deb|*.ddeb|*.dmg|*.tar.xz|*.tar.gz|*.exe|*.zip); do
echo " ${file##*/}: $(sha256sum "${file}" | cut -d " " -f 1)" >> ${{ github.workspace }}/CHECKSUMS.txt
done
Expand All @@ -311,3 +335,5 @@ jobs:
${{ github.workspace }}/OBS-Studio-${{ steps.check.outputs.version }}-Ubuntu-*.deb
${{ github.workspace }}/OBS-Studio-${{ steps.check.outputs.version }}-Ubuntu-*.ddeb
${{ github.workspace }}/OBS-Studio-${{ steps.check.outputs.version }}-Sources.tar.gz
${{ github.workspace }}/OBS-Studio-${{ steps.check.outputs.version }}-Windows-*.zip
${{ github.workspace }}/OBS-Studio-${{ steps.check.outputs.version }}-Windows-*.exe

0 comments on commit e785929

Please sign in to comment.