Skip to content

Release

Release #82

Workflow file for this run

name: Release
on:
push:
branches:
- main
- issue182_releaseprocess
permissions:
contents: write
packages: read
actions: read
jobs:
call-macos-build:
uses: oss-slu/SpeechTranscription/.github/workflows/macos-build.yml@build_fixes_copy
call-windows-build:
uses: oss-slu/SpeechTranscription/.github/workflows/windows-build.yml@build_fixes_copy
release:
needs: [call-macos-build, call-windows-build]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create artifacts directory
run: mkdir -p artifacts/macos artifacts/windows
- name: Download macOS build artifacts
uses: actions/download-artifact@v4
with:
name: SpeechTranscription_macos
path: artifacts/macos
- name: Download Windows build artifacts
uses: actions/download-artifact@v4
with:
name: SpeechTranscription_windows
path: artifacts/windows
- name: List directory structure
run: |
echo "Full directory structure:"
find . -type f -not -path "./.git/*"
echo "Contents of artifacts directory:"
ls -la artifacts/
ls -la artifacts/macos || echo "No macOS artifacts"
ls -la artifacts/windows || echo "No Windows artifacts"
- name: Create project ZIP
run: |
echo "Build number: ${{ github.run_number }}" >> release_notes.md
echo "Commit: ${{ github.sha }}" >> release_notes.md
echo "Branch: ${{ github.ref_name }}" >> release_notes.md
echo "Event type: ${{ github.event_name }}" >> release_notes.md
echo "## Downloads" >> release_notes.md
if [ -d "artifacts/macos" ] && [ "$(ls -A artifacts/macos)" ]; then
echo "- macOS executable included" >> release_notes.md
zip -j artifacts/Saltify_macos.zip artifacts/macos/*
else
echo "Note: macOS executable not available for this release" >> release_notes.md
fi
if [ -d "artifacts/windows" ] && [ "$(ls -A artifacts/windows)" ]; then
echo "- Windows executable included" >> release_notes.md
zip -j artifacts/Saltify_windows.zip artifacts/windows/*
else
echo "Note: Windows executable not available for this release" >> release_notes.md
fi
echo "- Saltify_macos.zip: macOS executable" >> release_notes.md
echo "- Saltify_windows.zip: Windows executable" >> release_notes.md
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.run_number }}
release_name: Release ${{ github.run_number }}
body_path: ./release_notes.md
draft: false
prerelease: false
- name: Upload Release Assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/Saltify_macos.zip
asset_name: Saltify_macos.zip
asset_content_type: application/zip
- name: Upload Release Assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/Saltify_windows.zip
asset_name: Saltify_windows.zip
asset_content_type: application/zip