Release #120
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: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version' | |
required: true | |
type: string | |
jobs: | |
get_release_info_job: | |
name: Get Release Info | |
runs-on: windows-latest | |
outputs: | |
version: ${{ steps.get_release_info.outputs.version }} | |
release_upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- uses: actions/checkout@v2 | |
- id: get_release_info | |
name: Get Release Info | |
shell: pwsh | |
run: | | |
#Requires -Version "6.1" | |
$version = "${{ inputs.version }}" | |
$tagName = "release-v$version" | |
$releaseName = "Release $version" | |
Write-Host @" | |
Version: $version | |
Tag Name: $tagName | |
"@ | |
Write-Output "::set-output name=version::$version" | |
Write-Output "::set-output name=tag_name::$tagName" | |
Write-Output "::set-output name=release_name::$releaseName" | |
- id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{steps.get_release_info.outputs.tag_name}} | |
release_name: ${{steps.get_release_info.outputs.release_name}} | |
draft: true | |
prerelease: true | |
release_windows_job: | |
name: Release Windows | |
runs-on: windows-latest | |
needs: get_release_info_job | |
steps: | |
- name: Print Debug Info | |
shell: pwsh | |
run: | | |
Write-Host @" | |
Version: ${{ needs.get_release_info_job.outputs.version }} | |
Release Upload URL: ${{ needs.get_release_info_job.outputs.release_upload_url }} | |
"@ | |
- uses: actions/checkout@v2 | |
- id: get_this_release_info | |
shell: pwsh | |
run: | | |
#Requires -Version "6.1" | |
$osName = if ($IsWindows) { "win32" } elseif ($IsLinux) { "ubuntu" } else { "darwin" } | |
$artifactPath = "FBX-glTF-conv-${{ needs.get_release_info_job.outputs.version }}-$osName.zip" | |
Write-Output "::set-output name=artifact_path::$artifactPath" | |
- id: build | |
name: Build | |
run: CI/GitHubBuild.ps1 -Version "${{ needs.get_release_info_job.outputs.version }}" -ArtifactPath "${{ steps.get_this_release_info.outputs.artifact_path }}" | |
shell: pwsh | |
- id: upload-release-asset | |
name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.get_release_info_job.outputs.release_upload_url }} | |
asset_path: ${{ steps.get_this_release_info.outputs.artifact_path }} | |
asset_name: ${{ steps.get_this_release_info.outputs.artifact_path }} | |
asset_content_type: application/zip | |
release_darwin_job: | |
name: Release MacOS | |
runs-on: macos-11 | |
needs: get_release_info_job | |
steps: | |
- name: Print Debug Info | |
shell: pwsh | |
run: | | |
Write-Host @" | |
Version: ${{ needs.get_release_info_job.outputs.version }} | |
Release Upload URL: ${{ needs.get_release_info_job.outputs.release_upload_url }} | |
"@ | |
- uses: actions/checkout@v2 | |
- id: get_this_release_info | |
shell: pwsh | |
run: | | |
#Requires -Version "6.1" | |
$osName = if ($IsWindows) { "win32" } elseif ($IsLinux) { "ubuntu" } else { "darwin" } | |
$artifactPath = "FBX-glTF-conv-${{ needs.get_release_info_job.outputs.version }}-$osName.zip" | |
Write-Output "::set-output name=artifact_path::$artifactPath" | |
- id: build | |
name: Build | |
run: CI/GitHubBuild.ps1 -Version "${{ needs.get_release_info_job.outputs.version }}" -ArtifactPath "${{ steps.get_this_release_info.outputs.artifact_path }}" | |
shell: pwsh | |
- id: upload-release-asset | |
name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.get_release_info_job.outputs.release_upload_url }} | |
asset_path: ${{ steps.get_this_release_info.outputs.artifact_path }} | |
asset_name: ${{ steps.get_this_release_info.outputs.artifact_path }} | |
asset_content_type: application/zip | |
release_ubuntu_job: | |
name: Release Ubuntu | |
runs-on: ubuntu-latest | |
needs: get_release_info_job | |
steps: | |
- name: Print Debug Info | |
shell: pwsh | |
run: | | |
Write-Host @" | |
Version: ${{ needs.get_release_info_job.outputs.version }} | |
Release Upload URL: ${{ needs.get_release_info_job.outputs.release_upload_url }} | |
"@ | |
- uses: actions/checkout@v2 | |
- id: get_this_release_info | |
shell: pwsh | |
run: | | |
#Requires -Version "6.1" | |
$osName = if ($IsWindows) { "win32" } elseif ($IsLinux) { "ubuntu" } else { "darwin" } | |
$artifactPath = "FBX-glTF-conv-${{ needs.get_release_info_job.outputs.version }}-$osName.zip" | |
Write-Output "::set-output name=artifact_path::$artifactPath" | |
- id: build | |
name: Build | |
run: CI/GitHubBuild.ps1 -Version "${{ needs.get_release_info_job.outputs.version }}" -ArtifactPath "${{ steps.get_this_release_info.outputs.artifact_path }}" | |
shell: pwsh | |
- id: upload-release-asset | |
name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.get_release_info_job.outputs.release_upload_url }} | |
asset_path: ${{ steps.get_this_release_info.outputs.artifact_path }} | |
asset_name: ${{ steps.get_this_release_info.outputs.artifact_path }} | |
asset_content_type: application/zip | |
release_types_job: | |
name: Release TypeScript Declaration Files | |
runs-on: windows-latest | |
needs: get_release_info_job | |
steps: | |
- name: Print Debug Info | |
shell: pwsh | |
run: | | |
Write-Host @" | |
Version: ${{ needs.get_release_info_job.outputs.version }} | |
Release Upload URL: ${{ needs.get_release_info_job.outputs.release_upload_url }} | |
"@ | |
- uses: actions/checkout@v2 | |
- id: get_this_release_info | |
shell: pwsh | |
run: | | |
#Requires -Version "6.1" | |
$artifactPath = "FBX-glTF-conv-${{ needs.get_release_info_job.outputs.version }}-types.zip" | |
Write-Output "::set-output name=artifact_path::$artifactPath" | |
- id: build | |
name: Build | |
run: Compress-Archive -Path "types\*" -DestinationPath "${{ steps.get_this_release_info.outputs.artifact_path }}" | |
shell: pwsh | |
- id: upload-release-asset | |
name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.get_release_info_job.outputs.release_upload_url }} | |
asset_path: ${{ steps.get_this_release_info.outputs.artifact_path }} | |
asset_name: ${{ steps.get_this_release_info.outputs.artifact_path }} | |
asset_content_type: application/zip |