diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 60bee42e..56d4b832 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -54,7 +54,7 @@ jobs: git checkout refs/remotes/origin/resources -- tests/resources/ - name: Download FFMPEG ${{ env.ffmpeg-version }} - uses: dsaltares/fetch-gh-release-asset@1.1.1 + uses: dsaltares/fetch-gh-release-asset@1.1.2 with: repo: 'GyanD/codexffmpeg' version: 'tags/${{ env.ffmpeg-version }}' @@ -91,10 +91,11 @@ jobs: ./dist/scenedetect/scenedetect -i tests/resources/goldeneye.mp4 detect-content time -e 2s - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: PySceneDetect-win64_portable path: dist/scenedetect + include-hidden-files: true test: runs-on: windows-latest @@ -104,7 +105,7 @@ jobs: with: ref: resources - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4.1.7 with: name: PySceneDetect-win64_portable path: build diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ccdfb69..dc79ea7a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,7 +103,7 @@ jobs: - name: Upload Package if: ${{ matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: scenedetect-dist path: | diff --git a/.github/workflows/check-code-format.yml b/.github/workflows/check-code-format.yml index 7d19726d..502579a1 100644 --- a/.github/workflows/check-code-format.yml +++ b/.github/workflows/check-code-format.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python 3.12 - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: '3.12' cache: 'pip' diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index b99eaeb3..9532dec3 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -40,15 +40,15 @@ jobs: uses: actions/checkout@v4 - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} queries: +security-and-quality - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 4e751977..0d4a0136 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -17,4 +17,4 @@ jobs: - name: 'Checkout Repository' uses: actions/checkout@v4 - name: 'Dependency Review' - uses: actions/dependency-review-action@v3 + uses: actions/dependency-review-action@v4 diff --git a/dist/pre_release.py b/dist/pre_release.py index c40751e1..11d00154 100644 --- a/dist/pre_release.py +++ b/dist/pre_release.py @@ -4,9 +4,13 @@ sys.path.append(os.path.abspath(".")) import scenedetect + + VERSION = scenedetect.__version__ -if len(sys.argv) <= 2 or not ("--ignore-installer" in sys.argv): +run_version_check = ("--ignore-installer" not in sys.argv) + +if run_version_check: installer_aip = '' with open("dist/installer/PySceneDetect.aip", "r") as f: installer_aip = f.read() @@ -16,12 +20,19 @@ with open("dist/.version_info", "wb") as f: v = VERSION.split(".") assert 2 <= len(v) <= 3, f"Unrecognized version format: {VERSION}" - - if len(v) == 3: - (maj, min, pat) = int(v[0]), int(v[1]), int(v[2]) - else: - (maj, min, pat) = int(v[0]), int(v[1]), 0 - + if len(v) < 3: + v.append("0") + (maj, min, pat, bld) = v[0], v[1], v[2], 0 + # If either major or minor have suffixes, assume it's a dev/beta build and set + # the final component to 999. + if not min.isdigit(): + assert "-" in min + min = min[:min.find("-")] + bld = 999 + if not pat.isdigit(): + assert "-" in pat + pat = pat[:pat.find("-")] + bld = 999 f.write(f"""# UTF-8 # # For more details about fixed file info 'ffi' see: @@ -30,8 +41,8 @@ ffi=FixedFileInfo( # filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4) # Set not needed items to zero 0. -filevers=(0, {maj}, {min}, {pat}), -prodvers=(0, {maj}, {min}, {pat}), +filevers=({maj}, {min}, {pat}, {bld}), +prodvers=({maj}, {min}, {pat}, {bld}), # Contains a bitmask that specifies the valid bits 'flags'r mask=0x3f, # Contains a bitmask that specifies the Boolean attributes of the file.