Files
OpenBB/.github/workflows/draft-release.yml
dagecko 3d417d38d4 fix: pin 19 unpinned action(s),extract 2 unsafe expression(s) to env vars (#7435)
* fix: pin 19 unpinned action(s),extract 2 unsafe expression(s) to env vars

* fix: correct SHA pins for rust-toolchain and esigner-codesign

* fix: correct SHA pins for rust-toolchain and esigner-codesign

---------

Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
2026-04-04 00:26:52 +00:00

77 lines
2.2 KiB
YAML
Vendored

name: Build Desktop Draft Release
on:
workflow_dispatch:
inputs:
draft:
description: "Create as draft release"
required: false
default: true
type: boolean
jobs:
build-windows:
uses: ./.github/workflows/build-desktop-win64.yml
with:
release: true
secrets: inherit
permissions:
contents: write
build-macos-arm:
uses: ./.github/workflows/build-desktop-osxARM.yml
with:
release: true
secrets: inherit
permissions:
contents: write
build-macos-x64:
uses: ./.github/workflows/build-desktop-osx64.yml
with:
release: true
secrets: inherit
permissions:
contents: write
publish:
needs: [build-windows, build-macos-arm, build-macos-x64]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v7
with:
path: artifacts
- name: Sanitize artifact filenames
run: |
find ./artifacts -depth -name "* *" | while read -r file; do mv "$file" "$(echo "$file" | tr ' ' '-')"; done
- name: Extract Version and Tag
id: extract_version
run: |
INSTALLER_FILE=$(find ./artifacts -name "*.exe" -o -name "*.dmg" | head -n 1)
VERSION=$(basename "$INSTALLER_FILE" | sed -n 's/.*_\([0-9]\+\.[0-9]\+\.[0-9]\+\)_.*/\1/p')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "release_name=ODP Desktop v$VERSION" >> $GITHUB_OUTPUT
echo "versioned_tag=Open-Data-Platform-v$VERSION" >> $GITHUB_OUTPUT
- name: Prepare assets
id: prep_assets
run: |
mkdir ./release_assets
find ./artifacts -type f -print -exec cp {} ./release_assets/ \;
echo "assets_path=./release_assets" >> $GITHUB_OUTPUT
- name: Create VERSIONED release
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2
with:
tag_name: ${{ steps.extract_version.outputs.versioned_tag }}
name: ${{ steps.extract_version.outputs.release_name }}
files: ${{ steps.prep_assets.outputs.assets_path }}/*
draft: true
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}