Fixed deploy #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy | |
on: | |
push: | |
branches: | |
- stable | |
#- main | |
jobs: | |
build: | |
name: Build Project | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
dotnet-version: ['8.x'] | |
env: | |
DOTNET_NOLOGO: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
VERSION: 1.0.0.0 # Set the version number here | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
- name: Restore dependencies | |
run: nuget restore | |
- name: Build and make appcast (Windows only) | |
if: matrix.os == 'windows-latest' | |
run: python Mirivoice.Desktop/appveyor.py 2>&1 | |
- name: Build and make appcast (Linux/Mac) | |
if: matrix.os != 'windows-latest' | |
run: python3 Mirivoice.Desktop/appveyor.py 2>&1 | |
- name: Package win-x86 artifact | |
if: matrix.os == 'windows-latest' | |
run: Compress-Archive -Path Mirivoice.Desktop/bin/win-x86/* -DestinationPath MiriVoice-win-x86.zip | |
- name: Package win-x64 artifact | |
if: matrix.os == 'windows-latest' | |
run: Compress-Archive -Path Mirivoice.Desktop/bin/win-x64/* -DestinationPath MiriVoice-win-x64.zip | |
- name: Create Release (Main) | |
id: create_release_main | |
if: github.ref == 'refs/heads/main' | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: build/${{ env.VERSION }} | |
release_name: MiriVoice ${{ env.version }} Beta | |
draft: false | |
prerelease: true | |
- name: Create Release (Stable) | |
id: create_release_stable | |
if: github.ref != 'refs/heads/main' | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: build/${{ env.VERSION }} | |
release_name: MiriVoice ${{ env.version }} | |
draft: false | |
prerelease: false | |
- name: Deploy Release (Main) | |
if: github.ref == 'refs/heads/main' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release_main.outputs.upload_url }} | |
asset_path: | |
| | |
MiriVoice-win-x86.zip | |
MiriVoice-win-x64.zip | |
Mirivoice.Desktop/osxbuild/MiriVoice-osx-x64.zip | |
MiriVoice-linux-x64.tar.gz | |
appcast.win-x86.xml | |
appcast.win-x64.xml | |
appcast.linux-x64.xml | |
appcast.osx-x64.xml | |
asset_name: | | |
MiriVoice-win-x86.zip | |
MiriVoice-win-x64.zip | |
MiriVoice-osx-x64.zip | |
MiriVoice-linux-x64.tar.gz | |
appcast.win-x86.xml | |
appcast.win-x64.xml | |
appcast.linux-x64.xml | |
appcast.osx-x64.xml | |
asset_content_type: | | |
application/zip | |
application/zip | |
application/zip | |
application/gzip | |
application/xml | |
application/xml | |
application/xml | |
application/xml | |
- name: Deploy Release (Stable) | |
if: github.ref != 'refs/heads/stable' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release_stable.outputs.upload_url }} | |
asset_path: | |
| | |
MiriVoice-win-x86.zip | |
MiriVoice-win-x64.zip | |
Mirivoice.Desktop/osxbuild/MiriVoice-osx-x64.zip | |
MiriVoice-linux-x64.tar.gz | |
appcast.win-x86.xml | |
appcast.win-x64.xml | |
appcast.linux-x64.xml | |
appcast.osx-x64.xml | |
asset_name: | | |
MiriVoice-win-x86.zip | |
MiriVoice-win-x64.zip | |
MiriVoice-osx-x64.zip | |
MiriVoice-linux-x64.tar.gz | |
appcast.win-x86.xml | |
appcast.win-x64.xml | |
appcast.linux-x64.xml | |
appcast.osx-x64.xml | |
asset_content_type: | | |
application/zip | |
application/zip | |
application/zip | |
application/gzip | |
application/xml | |
application/xml | |
application/xml | |
application/xml | |