From 6d8b0094f7f36d10fb052ee316ee4437a63657e1 Mon Sep 17 00:00:00 2001 From: Tyler Fox Date: Tue, 23 Jul 2024 12:11:24 -0700 Subject: [PATCH 1/3] Upload the full module as an artifact when testing --- .github/workflows/main.yml | 52 +++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c9afcd3..4c2d4b6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,7 +44,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: true @@ -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: | @@ -89,7 +89,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: true @@ -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: | @@ -137,7 +137,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: true @@ -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: | @@ -188,7 +188,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: true @@ -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: | @@ -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: @@ -263,7 +260,13 @@ 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: | @@ -271,15 +274,24 @@ jobs: 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 From fd0d732e2e5713c90723904d97a3d0bc474d0d3d Mon Sep 17 00:00:00 2001 From: Tyler Fox Date: Tue, 23 Jul 2024 15:58:21 -0700 Subject: [PATCH 2/3] Remove debug lines --- .github/workflows/main.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4c2d4b6..62393da 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -265,9 +265,6 @@ jobs: 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/ @@ -278,9 +275,6 @@ jobs: # 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: From 2c7a24cf787c38daf558f55896d61561f71ff857 Mon Sep 17 00:00:00 2001 From: Tyler Fox Date: Tue, 23 Jul 2024 16:15:42 -0700 Subject: [PATCH 3/3] uncomment the icon lines --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 62393da..c5a61c1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -271,8 +271,8 @@ jobs: 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: Upload Artifacts