First pass testing composite actions #77
Workflow file for this run
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 | |
on: | |
push: | |
branches: [ master ] | |
tags: | |
- v* | |
pull_request: | |
branches: [ master ] | |
jobs: | |
compile_plugin: | |
strategy: | |
matrix: | |
#maya: [2022, 2023, 2024, 2025] | |
maya: [2024] | |
#os: [macos-13, macos-latest, ubuntu-latest, windows-latest] | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
include: | |
# Add the maya update versions here | |
#- maya: 2022 | |
# update: 5 | |
#- maya: 2023 | |
# update: 3 | |
- maya: 2024 | |
update: 2 | |
#- maya: 2025 | |
# update: 1 | |
# cross-compiling is annoying so just fall back to macos-13 | |
#exclude: | |
# - os: macos-latest | |
# maya: 2022 | |
# - os: macos-latest | |
# maya: 2023 | |
# - os: macos-13 | |
# maya: 2024 | |
# - os: macos-13 | |
# maya: 2025 | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Maya Devkit | |
id: get-devkit | |
uses: tbttfox/mayaModuleActions/getMayaDevkit@master | |
with: | |
maya: ${{ matrix.maya }} | |
update: ${{ matrix.update }} | |
- name: Build | |
uses: tbttfox/mayaModuleActions/mayaMesonBuild@master | |
with: | |
maya: ${{ matrix.maya }} | |
update: ${{ matrix.update }} | |
build-type: release | |
devkit-path: ${{ steps.get-devkit.outputs.devkit-path }} | |
ext: ${{ steps.get-devkit.outputs.plugin-ext }} | |
- name: Repath Artifacts | |
shell: bash | |
run: | | |
mkdir -p artifacts/plug-ins | |
cp build/*.${{ steps.get-devkit.outputs.plugin-ext }} artifacts/plug-ins | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ runner.os }}-${{ matrix.maya }} | |
path: artifacts/plug-ins/*.${{ steps.get-devkit.outputs.plugin-ext }} | |
if-no-files-found: error | |
upload_release: | |
name: Upload release | |
needs: compile_plugin | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: git fetch --tags origin | |
- name: 'Get Previous tag' | |
id: previoustag | |
uses: "WyriHaximus/github-action-get-previous-tag@v1" | |
with: | |
fallback: 0.0.1 | |
- name: Package | |
uses: tbttfox/mayaModuleActions/packageMayaModule@master | |
with: | |
module-name: TwistSpline | |
folder-list: scripts icons | |
version: ${{ steps.previoustag.outputs.tag }} | |
- name: Upload distribution | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
files: | | |
*.zip |