tahoma2d/.github/workflows/windows_build.yml

94 lines
4.1 KiB
YAML
Raw Normal View History

2021-04-18 13:45:55 +12:00
name: Tahoma2D Windows Build
on: [push, pull_request]
jobs:
Windows:
runs-on: windows-2019
2021-04-18 13:45:55 +12:00
steps:
- uses: actions/checkout@v2
with:
lfs: true
- name: Install Dependencies
run: |
ci-scripts\windows\tahoma-install.bat
2021-04-24 00:03:20 +12:00
- name: Get CanonSDK
if: ${{ github.repository_owner == 'tahoma2d' && github.event_name == 'push' }}
2021-04-24 00:03:20 +12:00
run: |
2021-04-25 00:20:49 +12:00
curl -H "Authorization: token ${{ secrets.TAHOMA2D_TOKEN }}" -H "Accept:application/octet-stream" -fsSL -o EDSDK_v131231_Windows.zip https://api.github.com/repos/tahoma2d/CanonSDK/releases/assets/25267396
2021-04-24 00:03:20 +12:00
7z x EDSDK_v131231_Windows.zip -oEDSDK_v131231_Windows
move EDSDK_v131231_Windows\EDSDK\Header thirdparty\canon
move EDSDK_v131231_Windows\EDSDK_64\Dll thirdparty\canon
move EDSDK_v131231_Windows\EDSDK_64\Library thirdparty\canon
2021-04-18 13:45:55 +12:00
- name: Get 3rd Party Apps
run: |
ci-scripts\windows\tahoma-get3rdpartyapps.bat
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Build Tahoma2D
run: |
ci-scripts\windows\tahoma-build.bat
- name: Create Package
run: |
ci-scripts\windows\tahoma-buildpkg.bat
mkdir artifact
cp -r toonz\build\Tahoma2D artifact
2021-04-18 13:45:55 +12:00
- uses: actions/upload-artifact@v1
with:
name: Tahoma2D-win
path: artifact
- uses: actions/upload-artifact@v1
with:
name: debug-symbols.zip
path: toonz\build\debug-symbols.zip
2021-04-25 00:20:49 +12:00
- name: Get Nightly Release Date
if: ${{ github.repository_owner == 'tahoma2d' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
2021-04-25 00:20:49 +12:00
run: |
chcp 65001 #set code page to utf-8
echo ("NIGHTLYDATE=" + (Get-Date -format "yyyy-MM-dd")) >> $env:GITHUB_ENV
echo ("NIGHTLYDATETIME=" + (Get-Date -format "yyyy-MM-dd HH:mm:ss UTC")) >> $env:GITHUB_ENV
2021-05-29 08:20:57 +12:00
- name: Create/Update Nightlies Tag
if: ${{ github.repository_owner == 'tahoma2d' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
2021-05-29 08:20:57 +12:00
run: |
git remote add nightly_repo https://tahoma2d:${{ secrets.TAHOMA2D_TOKEN }}@github.com/tahoma2d/tahoma2d_nightlies.git
git config lfs.https://tahoma2d:${{ secrets.TAHOMA2D_TOKEN }}@github.com/tahoma2d/tahoma2d_nightlies.git.lfs.locksverify false
git fetch --unshallow
git tag -f nightly
git push -f origin nightly
git tag -f nightly-${{ github.sha }}
git config --unset-all http.https://github.com/.extraheader
git push -f nightly_repo nightly-${{ github.sha }}
git remote rm nightly_repo
2021-04-25 00:20:49 +12:00
- name: Update Latest Nightly Release
if: ${{ github.repository_owner == 'tahoma2d' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
2021-04-25 00:20:49 +12:00
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: false
artifacts: toonz\build\Tahoma2D-win.zip,toonz\build\debug-symbols.zip
artifactContentType: "raw"
body: ${{ github.event.head_commit.message }}
name: Latest Nightly ${{ env.NIGHTLYDATE }}
2021-04-25 00:20:49 +12:00
prerelease: true
replacesArtifacts: true
tag: nightly
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Nightlies Release
if: ${{ github.repository_owner == 'tahoma2d' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
2021-04-25 00:20:49 +12:00
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: false
artifacts: toonz\build\Tahoma2D-win.zip,toonz\build\debug-symbols.zip
artifactContentType: "raw"
body: ${{ github.event.head_commit.message }}
name: ${{ env.NIGHTLYDATETIME }}
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
2021-04-25 00:20:49 +12:00
owner: tahoma2d
prerelease: true
replacesArtifacts: true
repo: tahoma2d_nightlies
tag: nightly-${{ github.sha }}
token: ${{ secrets.TAHOMA2D_TOKEN }}