Skip to content

Commit

Permalink
Upload the full module as an artifact when testing
Browse files Browse the repository at this point in the history
  • Loading branch information
tbttfox committed Jul 23, 2024
1 parent eafd72d commit 6d8b009
Showing 1 changed file with 32 additions and 20 deletions.
52 changes: 32 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -67,7 +67,7 @@ jobs:
Copy-Item "./build/${{env.BUILD_TYPE}}/TwistSpline.mll" -Destination "artifacts/plug-ins"
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: windows-${{matrix.maya}}
path: |
Expand All @@ -89,7 +89,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -115,7 +115,7 @@ jobs:
cp ./build/${{env.BUILD_TYPE}}/TwistSpline.bundle artifacts/plug-ins
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mac-${{matrix.maya}}
path: |
Expand All @@ -137,7 +137,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -163,7 +163,7 @@ jobs:
cp ./build/${{env.BUILD_TYPE}}/TwistSpline.bundle artifacts/plug-ins
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mac-${{matrix.maya}}
path: |
Expand All @@ -188,7 +188,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -213,7 +213,7 @@ jobs:
cp "./build/TwistSpline.so" "artifacts/plug-ins"
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: linux-${{matrix.maya}}
path: |
Expand All @@ -236,15 +236,12 @@ jobs:
needs: [maya-win, maya-linux, maya-macos-x86_64, maya-macos-arm64]
runs-on: ubuntu-latest

# Only run on e.g. v0.1.0
if: startsWith(github.ref, 'refs/tags/v')

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

# Omitting name: means "download all artifacts"
# Destination directory structure:
Expand All @@ -263,23 +260,38 @@ jobs:
path: modules/TwistSpline

- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
run: |
LATEST_TAG=$(git describe --tags --abbrev=0 || echo "NOTAG")
echo "LatestTag: ${LATEST_TAG}"
echo "RELEASE_VERSION=${LATEST_TAG}" >> $GITHUB_ENV
- name: Display structure of working directory 1
run: ls -R

- name: Create distribution
run: |
cp ./TwistSpline.mod modules/
mkdir -p modules/TwistSpline/scripts
cp -r ./scripts modules/TwistSpline
mkdir -p modules/TwistSpline/icons
cp ./icons/*.png modules/TwistSpline/icons
cp ./icons/*.xpm modules/TwistSpline/icons
# cp ./icons/*.png modules/TwistSpline/icons
# cp ./icons/*.xpm modules/TwistSpline/icons
zip -r TwistSpline-${{env.RELEASE_VERSION}}.zip modules/
- name: Display structure of working directory 1
run: ls -R

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: TwistSpline-module
path: TwistSpline-${{env.RELEASE_VERSION}}.zip

- name: Upload distribution
uses: "marvinpinto/action-automatic-releases@latest"
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: softprops/action-gh-release@v1
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
TwistSpline-*.zip
*.zip

0 comments on commit 6d8b009

Please sign in to comment.