Skip to content

release changes 1

release changes 1 #61

Workflow file for this run

name: Release
on:
push:
branches:
- issue178_build-test-failures
- main
- issue182_releaseprocess
permissions:
contents: write
packages: read
actions: read
jobs:
call-macos-build:
uses: ./.github/workflows/macos-build.yml@main

Check failure on line 17 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

invalid value workflow reference: cannot specify version when calling local workflows
call-windows-build:
uses: ./.github/workflows/windows-build.yml@main
release:
needs: [call-macos-build, call-windows-build]
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Create Artifacts Directory
run: mkdir -p artifacts/macos artifacts/windows
- name: Download macOS Build Artifact
uses: actions/download-artifact@v4
with:
name: SpeechTranscription_macos
path: artifacts/macos
- name: Download Windows Build Artifact
uses: actions/download-artifact@v4
with:
name: SpeechTranscription_windows
path: artifacts/windows
- name: Verify Artifacts
run: |
if [ ! -f "artifacts/macos/Saltify" ]; then
echo "No macOS artifact found!" && exit 1
fi
if [ ! -f "artifacts/windows/Saltify.exe" ]; then
echo "No Windows artifact found!" && exit 1
fi
- name: Create Release Notes and ZIP Files
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 "" >> release_notes.md
echo "## Downloads" >> release_notes.md
# macOS
if [ -f "artifacts/macos/Saltify" ]; then
chmod +x artifacts/macos/Saltify
zip -j artifacts/Saltify_macos.zip artifacts/macos/Saltify
echo "- macOS executable included" >> release_notes.md
else
echo "Note: macOS executable not available" >> release_notes.md
fi
# Windows
if [ -f "artifacts/windows/Saltify.exe" ]; then
zip -j artifacts/Saltify_windows.zip artifacts/windows/Saltify.exe
echo "- Windows executable included" >> release_notes.md
else
echo "Note: Windows executable not available" >> release_notes.md
fi
- 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 macOS Release Asset
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 Windows Release Asset
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