Skip to content

Merge pull request #2 from OmooLab/feature/dev #1

Merge pull request #2 from OmooLab/feature/dev

Merge pull request #2 from OmooLab/feature/dev #1

Workflow file for this run

name: Upload Assets to Release
on:
push:
branches:
- "release/*"
jobs:
# draft_release:
# name: Draft Release
# runs-on: ubuntu-latest
# outputs:
# upload_url: ${{ steps.draft_release.outputs.upload_url }}
# version: ${{ steps.set_env.outputs.version }}
# steps:
# - name: Set Version Env
# id: set_env
# run: |
# ref_name=${{ github.ref_name }}
# echo "version=${ref_name#release/}" >> "$GITHUB_OUTPUT"
# - name: Get release
# id: draft_release
# uses: cardinalby/[email protected]
# with:
# releaseName: Draft
# env:
# GITHUB_TOKEN: ${{ github.token }}
draft_release:
name: Draft Release
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.draft_release.outputs.upload_url }}
version: ${{ steps.set_env.outputs.version }}
steps:
- name: Set Version Env
id: set_env
run: |
ref_name=${{ github.ref_name }}
echo "version=${ref_name#release/}" >> "$GITHUB_OUTPUT"
- name: Draft Release ${{ steps.set_env.outputs.version }}
uses: release-drafter/release-drafter@v5
id: draft_release
with:
name: ${{ steps.set_env.outputs.version }}
tag: ${{ steps.set_env.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
upload_houdini_package:
name: Upload Houdini Package
needs: draft_release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Zip Package
run: |
rm -r assets/Icons
rm -r assets/OCIO
zip -r package.zip assets packages python README.md
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.draft_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./package.zip
asset_name: OmooAsset_${{ needs.draft_release.outputs.version }}.zip
asset_content_type: application/zip
upload_substance_plugin:
name: Upload Substance 3D Painter Plugin
needs: draft_release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Zip Add-on
run: |
cd plugins/Substance3D_Painter
zip -r package.zip assets python
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.draft_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./plugins/Substance3D_Painter/package.zip
asset_name: OmooAsset_${{ needs.draft_release.outputs.version }}_SubstanceBridge.zip
asset_content_type: application/zip
upload_blender_addon:
name: Upload Blender Add-on
needs: draft_release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Zip Add-on
run: |
cd plugins/Blender
zip -r package.zip OmooAsset
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.draft_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./plugins/Blender/package.zip
asset_name: OmooAsset_${{ needs.draft_release.outputs.version }}_Blender.zip
asset_content_type: application/zip
upload_cinema4d_plugin:
name: Upload Cinema4D Plugin
needs: draft_release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Dependencies
run: |
cd plugins/Cinema4D
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip list
- name: Zip Package
run: |
cd plugins/Cinema4D
mkdir -p python311/libs
mv venv/lib/python3.11/site-packages/pxr python311/libs/
mv venv/lib/python3.11/site-packages/usd_core-24.3.dist-info python311/libs/
zip -r package.zip plugins python311
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.draft_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./plugins/Cinema4D/package.zip
asset_name: OmooAsset_${{ needs.draft_release.outputs.version }}_Cinema4D.zip
asset_content_type: application/zip
upload_ocio_config:
name: Upload OCIO Config
needs: draft_release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Zip Package
run: |
cd assets
zip -r ../package.zip OCIO
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.draft_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./package.zip
asset_name: OmooAsset_${{ needs.draft_release.outputs.version }}_OCIO.zip
asset_content_type: application/zip