bumped version to 2.1.0 #88
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: | |
push: | |
branches: [ "releases/**" ] | |
pull_request: | |
branches: [ "releases/**" ] | |
env: | |
BUILD_CONFIGURATION: Release | |
jobs: | |
windows: | |
name: Windows | |
runs-on: windows-latest | |
permissions: | |
contents: read | |
timeout-minutes: 20 | |
env: | |
SOLUTION_FILE_PATH: Player.Windows.sln | |
PROJECT_FILE_PATH: UI/Windows/Player.UI.Windows.csproj | |
JPEG_DEPENDANCY_PATH: "${{ github.workspace }}\\Decoders\\Jpeg" | |
INSTALLER_PROJECT_PATH: Installer/Installer.vdproj | |
PUBLISH_PATH: "bin/Release/net6.0-windows/publish/" | |
STANDALONE_ARTIFACT_PATH: "${{ github.workspace }}\\UI\\Windows\\bin\\Release\\net6.0-windows\\publish\\" | |
INSTALLER_ARTIFACT_PATH: "${{ github.workspace }}\\Installer\\" | |
BUILD_PLATFORM: x64 | |
BUILD_STANDALONE_ARTIFACT_NAME: "Player-win64-standalone" | |
BUILD_INSTALLER_ARTIFACT_NAME: "Player-win64-installer" | |
BUILD_INSTALLER_NAME: "OCTOPUS-RAW-Player-Windows.msi" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: microsoft/[email protected] | |
- uses: seanmiddleditch/gha-setup-vsdevenv@v4 | |
- name: Read Version | |
id: version | |
uses: juliangruber/read-file-action@v1 | |
with: | |
path: "${{ github.workspace }}\\Version" | |
- name: Apply Version | |
shell: pwsh | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
.\ApplyVersion.ps1 | |
$installer_name="OCTOPUS-RAW-Player-Windows-${{ steps.version.outputs.content }}.msi" | |
"BUILD_INSTALLER_NAME=$installer_name" >> $env:GITHUB_ENV | |
- name: Upload version artifact | |
uses: actions/[email protected] | |
with: | |
name: version | |
path: "${{ github.workspace }}\\Version" | |
if-no-files-found: error | |
- name: Install dependancies | |
shell: pwsh | |
working-directory: ${{ env.JPEG_DEPENDANCY_PATH }} | |
run: .\GetDependancies.ps1 | |
- name: Restore NuGet packages | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: msbuild -t:restore ${{env.SOLUTION_FILE_PATH}} -p:PublishReadyToRun=true | |
- name: Build | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{env.BUILD_PLATFORM}} ${{env.SOLUTION_FILE_PATH}} | |
- name: Publish | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: msbuild /m /t:publish /p:RuntimeIdentifier=win-x64 /p:PublishDir="${{env.PUBLISH_PATH}}" /p:IncludeNativeLibrariesForSelfExtract=true /p:SelfContained=true /p:PublishSingleFile=true /p:PublishReadyToRun=true /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{env.BUILD_PLATFORM}} ${{env.PROJECT_FILE_PATH}} | |
- name: Sign .exe | |
uses: sslcom/esigner-codesign@develop | |
with: | |
command: sign | |
username: ${{ secrets.PEARTREE_SSL_USERNAME }} | |
password: ${{ secrets.PEARTREE_SSL_PASSWORD }} | |
totp_secret: ${{ secrets.PEARTREE_CERT_TOTP_SECRET }} | |
file_path: ${{ env.STANDALONE_ARTIFACT_PATH }}OCTOPUS RAW Player.exe | |
malware_block: false | |
override: true | |
- name: Upload standalone artifacts | |
uses: actions/[email protected] | |
with: | |
name: '${{env.BUILD_STANDALONE_ARTIFACT_NAME}}-${{ steps.version.outputs.content }}' | |
path: "${{ env.STANDALONE_ARTIFACT_PATH }}*.exe" | |
if-no-files-found: error | |
- name: Prepare Installer | |
working-directory: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild' | |
run: .\DisableOutOfProcBuild.exe | |
- name: Create Installer | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: DevEnv ${{env.INSTALLER_PROJECT_PATH}} /build ${{env.BUILD_CONFIGURATION}} | |
- name: Sign .msi | |
uses: sslcom/esigner-codesign@develop | |
with: | |
command: sign | |
username: ${{ secrets.PEARTREE_SSL_USERNAME }} | |
password: ${{ secrets.PEARTREE_SSL_PASSWORD }} | |
totp_secret: ${{ secrets.PEARTREE_CERT_TOTP_SECRET }} | |
file_path: ${{ env.INSTALLER_ARTIFACT_PATH }}${{env.BUILD_INSTALLER_NAME}} | |
program_name: OCTOPUS RAW Player | |
malware_block: false | |
override: true | |
- name: Upload installer artifacts | |
uses: actions/[email protected] | |
with: | |
name: '${{env.BUILD_INSTALLER_ARTIFACT_NAME}}-${{ steps.version.outputs.content }}' | |
path: "${{ env.INSTALLER_ARTIFACT_PATH }}*.msi" | |
if-no-files-found: error | |
macos: | |
name: macOS | |
runs-on: macOS-12 | |
permissions: | |
contents: read | |
timeout-minutes: 20 | |
env: | |
SOLUTION_FILE_PATH: Player.macOS.sln | |
JPEG_DEPENDANCY_PATH: "${{ github.workspace }}/Decoders/Jpeg" | |
DECODER_WORKSPACE_PATH: Decoders/Decoders.macOS.xcworkspace | |
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} | |
P12_PASSWORD: ${{ secrets.P12_PASSWORD }} | |
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }} | |
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | |
DECODER_JPEG_LIB_PATH: Decoders/Jpeg/Build/Products/Release | |
DECODER_UNPACK_LIB_PATH: Decoders/Unpack/Build/Products/Release | |
DECODER_JPEG_ARCHIVE_PATH: Decoders/Jpeg.xcarchive | |
DECODER_UNPACK_ARCHIVE_PATH: Decoders/Unpack.xcarchive | |
BUILD_STANDALONE_ARTIFACT_NAME: "Player-macOS-standalone" | |
BUILD_INSTALLER_ARTIFACT_NAME: "Player-macOS-installer" | |
STANDALONE_BUILD_PATH: "${{ github.workspace }}/UI/macOS/bin/Release/OCTOPUS RAW Player.app" | |
STANDALONE_BUILD_PATH_NO_EXT: "${{ github.workspace }}/UI/macOS/bin/Release/OCTOPUS RAW Player" | |
STANDALONE_BUILD_DIR: "${{ github.workspace }}/UI/macOS/bin/Release" | |
STANDALONE_BUILD_DMG_PATH: "${{ github.workspace }}/UI/macOS/bin/Release/OCTOPUS-RAW-Player-macOS" | |
INSTALLER_BUILD_PKG_PATH: "${{ github.workspace }}/UI/macOS/bin/Release/OCTOPUS-RAW-Player-macOS" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: 'true' | |
- name: Read Version | |
id: version | |
uses: juliangruber/read-file-action@v1 | |
with: | |
path: "${{ github.workspace }}/Version" | |
- name: Apply Version | |
shell: bash | |
run: | | |
./ApplyVersion.sh | |
dmg_path="${{ env.STANDALONE_BUILD_DMG_PATH }}-${{ steps.version.outputs.content }}.dmg" | |
echo "STANDALONE_BUILD_DMG_PATH=$dmg_path" >> $GITHUB_ENV | |
pkg_path="${{ env.INSTALLER_BUILD_PKG_PATH }}-${{ steps.version.outputs.content }}.pkg" | |
echo "INSTALLER_BUILD_PKG_PATH=$pkg_path" >> $GITHUB_ENV | |
- name: Install dependancies | |
working-directory: ${{env.JPEG_DEPENDANCY_PATH}} | |
shell: bash | |
run: ./GetDependancies.sh | |
- name: "Import distribution certificate" | |
uses: apple-actions/import-codesign-certs@v2 | |
with: | |
p12-file-base64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} | |
p12-password: ${{ secrets.P12_PASSWORD }} | |
keychain-password: ${{ secrets.KEYCHAIN_PASSWORD }} | |
- name: "Build Jpeg decoder native library" | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: xcodebuild -workspace "${{env.DECODER_WORKSPACE_PATH}}" -scheme "Jpeg" clean archive -configuration release -archivePath "${{env.DECODER_JPEG_ARCHIVE_PATH}}" | |
- name: "Build Unpack decoder native library" | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: xcodebuild -workspace "${{env.DECODER_WORKSPACE_PATH}}" -scheme "Unpack" clean archive -configuration release -archivePath "${{env.DECODER_UNPACK_ARCHIVE_PATH}}" | |
- name: Prepare decoder native libraries | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
mkdir -p ${{ env.DECODER_JPEG_LIB_PATH }} | |
mkdir -p ${{ env.DECODER_UNPACK_LIB_PATH }} | |
cp ${{env.DECODER_JPEG_ARCHIVE_PATH}}/Products/usr/local/lib/libJpeg.dylib ${{ env.DECODER_JPEG_LIB_PATH }} | |
cp ${{env.DECODER_UNPACK_ARCHIVE_PATH}}/Products/usr/local/lib/libUnpack.dylib ${{ env.DECODER_UNPACK_LIB_PATH }} | |
- name: Set Xamarin version | |
run: $VM_ASSETS/select-xamarin-sdk-v2.sh --mono=6.12 --mac=8.12 | |
- name: Restore NuGet packages | |
run: nuget restore ${{env.SOLUTION_FILE_PATH}} | |
- name: Build | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: msbuild ${{env.SOLUTION_FILE_PATH}} /t:Build /p:Configuration=Release /p:CreatePackage=false | |
- name: Create .DMG | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
brew install graphicsmagick imagemagick | |
npm install --global create-dmg | |
create-dmg "${{ env.STANDALONE_BUILD_PATH }}" "${{ env.STANDALONE_BUILD_DIR }}" | |
mv "${{ env.STANDALONE_BUILD_PATH_NO_EXT }} ${{ steps.version.outputs.content }}.dmg" "${{ env.STANDALONE_BUILD_DMG_PATH }}" | |
- name: Notarize .DMG | |
run: | | |
xcrun notarytool store-credentials "AC_PASSWORD" --team-id "${{ secrets.NOTARIZATION_TEAM_ID }}" --apple-id "${{ secrets.NOTARIZATION_USERNAME }}" --password "${{ secrets.NOTARIZATION_PASSWORD }}" | |
xcrun notarytool submit "${{ env.STANDALONE_BUILD_DMG_PATH }}" --keychain-profile "AC_PASSWORD" --wait | |
xcrun stapler staple "${{ env.STANDALONE_BUILD_DMG_PATH }}" | |
- name: "Import installer certificate" | |
uses: apple-actions/import-codesign-certs@v1 | |
with: | |
p12-file-base64: ${{ secrets.INSTALLER_CERTIFICATE_BASE64 }} | |
p12-password: ${{ secrets.INSTALLER_P12_PASSWORD }} | |
keychain-password: ${{ secrets.KEYCHAIN_PASSWORD }} | |
keychain: "installer-certificate" | |
- name: Create .PKG | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
productbuild --product UI/macOS/Product.plist --version "${{ steps.version.outputs.content }}" --component "${{ env.STANDALONE_BUILD_PATH }}" /Applications --keychain "installer-certificate.keychain-db" --sign "${{ secrets.DEVELOPER_ID_INSTALLER }}" "${{ env.INSTALLER_BUILD_PKG_PATH }}" | |
pkgutil --check-signature "${{ env.INSTALLER_BUILD_PKG_PATH }}" | |
- name: Notarize .PKG | |
run: | | |
xcrun notarytool store-credentials "AC_PASSWORD" --team-id "${{ secrets.NOTARIZATION_TEAM_ID }}" --apple-id "${{ secrets.NOTARIZATION_USERNAME }}" --password "${{ secrets.NOTARIZATION_PASSWORD }}" | |
xcrun notarytool submit "${{ env.INSTALLER_BUILD_PKG_PATH }}" --keychain-profile "AC_PASSWORD" --wait | |
xcrun stapler staple "${{ env.INSTALLER_BUILD_PKG_PATH }}" | |
- name: Upload .DMG artifact | |
uses: actions/[email protected] | |
with: | |
name: ${{ env.BUILD_STANDALONE_ARTIFACT_NAME }}-${{ steps.version.outputs.content }} | |
path: ${{ env.STANDALONE_BUILD_DMG_PATH }} | |
if-no-files-found: error | |
- name: Upload .PKG artifact | |
uses: actions/[email protected] | |
with: | |
name: ${{ env.BUILD_INSTALLER_ARTIFACT_NAME }}-${{ steps.version.outputs.content }} | |
path: ${{ env.INSTALLER_BUILD_PKG_PATH }} | |
if-no-files-found: error | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
needs: [windows, macos] | |
timeout-minutes: 5 | |
steps: | |
- name: Download artifacts | |
uses: actions/[email protected] | |
- name: Display artifacts | |
run: ls -R | |
- name: Read Version | |
id: version | |
uses: juliangruber/read-file-action@v1 | |
with: | |
path: "version/Version" | |
- name: Create Release | |
id: create-release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ steps.version.outputs.content }} | |
release_name: v${{ steps.version.outputs.content }} | |
draft: false | |
prerelease: false | |
- name: Upload Windows installer release asset | |
id: upload-release-asset-win-installer | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-release.outputs.upload_url }} | |
asset_path: ./Player-win64-installer-${{ steps.version.outputs.content }}/OCTOPUS-RAW-Player-Windows-${{ steps.version.outputs.content }}.msi | |
asset_name: OCTOPUS-RAW-Player-Windows-${{ steps.version.outputs.content }}.msi | |
asset_content_type: application/x-msi | |
- name: Zip Windows standalone .exe | |
working-directory: "./Player-win64-standalone-${{ steps.version.outputs.content }}" | |
run: zip "../OCTOPUS-RAW-Player-Windows-${{ steps.version.outputs.content }}.zip" "./OCTOPUS RAW Player.exe" | |
- name: Upload Windows standalone release asset | |
id: upload-release-asset-win-standalone | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-release.outputs.upload_url }} | |
asset_path: ./OCTOPUS-RAW-Player-Windows-${{ steps.version.outputs.content }}.zip | |
asset_name: OCTOPUS-RAW-Player-Windows-${{ steps.version.outputs.content }}.zip | |
asset_content_type: application/zip | |
- name: Upload macOS installer release asset | |
id: upload-release-asset-mac-installer | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-release.outputs.upload_url }} | |
asset_path: "./Player-macOS-installer-${{ steps.version.outputs.content }}/OCTOPUS-RAW-Player-macOS-${{ steps.version.outputs.content }}.pkg" | |
asset_name: "OCTOPUS-RAW-Player-macOS-${{ steps.version.outputs.content }}.pkg" | |
asset_content_type: application/x-newton-compatible-pkg | |
- name: Upload macOS standalone release asset | |
id: upload-release-asset-mac-standalone | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-release.outputs.upload_url }} | |
asset_path: "./Player-macOS-standalone-${{ steps.version.outputs.content }}/OCTOPUS-RAW-Player-macOS-${{ steps.version.outputs.content }}.dmg" | |
asset_name: "OCTOPUS-RAW-Player-macOS-${{ steps.version.outputs.content }}.dmg" | |
asset_content_type: application/octet-stream |