diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e71c5ff..b674737 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,14 +20,16 @@ jobs: image: danielflook/python-minifier-build:python3.13-2024-09-15 steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: fetch-depth: 1 - show-progress: 'false' + show-progress: false + persist-credentials: false - name: Set version statically + env: + VERSION: ${{ github.event.release.tag_name }} run: | - VERSION=${{ github.event.release.tag_name }} sed -i "s/setup_requires=.*/version='$VERSION',/; s/use_scm_version=.*//" setup.py echo "Version: $VERSION" @@ -41,14 +43,14 @@ jobs: echo "wheel=$(find dist -name '*-py3-*.whl' -printf "%f\n")" >> "$GITHUB_OUTPUT" - name: Upload sdist artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4.4.3 with: name: dist-sdist path: dist/${{ steps.package.outputs.sdist }} if-no-files-found: error - name: Upload Python 3 wheel artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4.4.3 with: name: dist-py3-wheel path: dist/${{ steps.package.outputs.wheel }} @@ -64,21 +66,23 @@ jobs: image: danielflook/python-minifier-build:python2.7-2024-09-15 steps: - name: Download source distribution artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v4.1.8 with: name: dist-sdist path: dist/ - name: Build Python 2 wheel id: package + env: + PYTHON3_SDIST: ${{ needs.package_python3.outputs.sdist }} run: | dnf install -y findutils pip install --upgrade wheel - pip wheel dist/${{ needs.package_python3.outputs.sdist }} -w dist + pip wheel dist/"$PYTHON3_SDIST" -w dist echo "wheel=$(find dist -name '*-py2-*.whl' -printf "%f\n")" >> "$GITHUB_OUTPUT" - name: Upload Python 2 wheel artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4.4.3 with: name: dist-py2-wheel path: dist/${{ steps.package.outputs.wheel }} @@ -91,21 +95,24 @@ jobs: container: image: danielflook/python-minifier-build:python3.13-2024-09-15 steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v4.1.8 with: name: dist-sdist path: dist/ - name: Install package + env: + PYTHON3_SDIST: ${{ needs.package_python3.outputs.sdist }} run: | - pip3 install dist/${{needs.package_python3.outputs.sdist}} + pip3 install dist/"$PYTHON3_SDIST" pyminify --version - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: fetch-depth: 1 - show-progress: 'false' + show-progress: false + persist-credentials: false - name: Build documentation run: | @@ -113,7 +120,7 @@ jobs: sphinx-build docs/source /tmp/build - name: Upload documentation artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@v3.0.1 with: path: /tmp/build @@ -130,14 +137,14 @@ jobs: url: https://pypi.org/project/python-minifier/${{ github.event.release.tag_name }} steps: - name: Download distribution artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v4.1.8 with: pattern: dist-* path: dist/ - merge-multiple: 'true' + merge-multiple: true - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@v1.10.1 + uses: pypa/gh-action-pypi-publish@v1.12.3 with: print-hash: true verbose: true @@ -156,4 +163,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v4.0.5 diff --git a/.github/workflows/release_test.yaml b/.github/workflows/release_test.yaml index 241f4f3..7e4104d 100644 --- a/.github/workflows/release_test.yaml +++ b/.github/workflows/release_test.yaml @@ -14,11 +14,14 @@ jobs: image: danielflook/python-minifier-build:python3.13-2024-09-15 steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: fetch-depth: 1 - fetch-tags: 'true' - show-progress: 'false' + show-progress: false + + - name: Fetch tags + run: | + git fetch --tags --force - name: Set version statically run: | @@ -37,14 +40,14 @@ jobs: echo "wheel=$(find dist -name '*-py3-*.whl' -printf "%f\n")" >> "$GITHUB_OUTPUT" - name: Upload sdist artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4.4.3 with: name: dist-sdist path: dist/${{ steps.package.outputs.sdist }} if-no-files-found: error - name: Upload Python 3 wheel artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4.4.3 with: name: dist-py3-wheel path: dist/${{ steps.package.outputs.wheel }} @@ -60,21 +63,23 @@ jobs: image: danielflook/python-minifier-build:python2.7-2024-09-15 steps: - name: Download source distribution artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v4.1.8 with: name: dist-sdist path: dist/ - name: Build Python 2 wheel id: package + env: + PYTHON3_SDIST: ${{ needs.package_python3.outputs.sdist }} run: | dnf install -y findutils pip install --upgrade wheel - pip wheel dist/${{ needs.package_python3.outputs.sdist }} -w dist + pip wheel "dist/$PYTHON3_SDIST" -w dist echo "wheel=$(find dist -name '*-py2-*.whl' -printf "%f\n")" >> "$GITHUB_OUTPUT" - name: Upload Python 2 wheel artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4.4.3 with: name: dist-py2-wheel path: dist/${{ steps.package.outputs.wheel }} @@ -87,22 +92,25 @@ jobs: container: image: danielflook/python-minifier-build:python3.13-2024-09-15 steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v4.1.8 with: name: dist-sdist path: dist/ - name: Install package + env: + PYTHON3_SDIST: ${{ needs.package_python3.outputs.sdist }} run: | - pip3 install dist/${{needs.package_python3.outputs.sdist}} + pip3 install "dist/$PYTHON3_SDIST" pyminify --version - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: fetch-depth: 1 - fetch-tags: 'true' - show-progress: 'false' + fetch-tags: true + show-progress: false + persist-credentials: false - name: Build documentation run: | @@ -120,18 +128,19 @@ jobs: package_type: [sdist, wheel] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: fetch-depth: 1 - fetch-tags: 'true' - show-progress: 'false' + fetch-tags: true + show-progress: false + persist-credentials: false - name: Download distribution artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v4.1.8 with: pattern: dist-* path: dist/ - merge-multiple: 'true' + merge-multiple: true - name: Test uses: ./.github/actions/run-in-container @@ -165,26 +174,30 @@ jobs: image: danielflook/python-minifier-build:python3.13-2024-09-15 steps: - name: Download distribution artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v4.1.8 with: pattern: dist-* path: dist/ - merge-multiple: 'true' + merge-multiple: true - name: Install package + env: + PYTHON3_SDIST: ${{ needs.package_python3.outputs.sdist }} + PYTHON3_WHEEL: ${{ needs.package_python3.outputs.wheel }} run: | if [[ "${{ matrix.package_type }}" == "sdist" ]]; then - pip3.13 install dist/${{needs.package_python3.outputs.sdist}} + pip3.13 install "dist/$PYTHON3_SDIST" else - pip3.13 install dist/${{needs.package_python3.outputs.wheel}} + pip3.13 install "dist/$PYTHON3_WHEEL" fi - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: fetch-depth: 1 - fetch-tags: 'true' - show-progress: 'false' + fetch-tags: true + show-progress: false + persist-credentials: false - name: Test typing run: | diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 147cecc..616015e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -13,11 +13,11 @@ jobs: python: ["python2.7", "python3.3", "python3.4", "python3.5", "python3.6", "python3.7", "python3.8", "python3.9", "python3.10", "python3.11", "python3.12", "python3.13", "pypy", "pypy3"] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: fetch-depth: 1 - fetch-tags: 'true' - show-progress: 'false' + show-progress: false + persist-credentials: false - name: Set version statically run: | diff --git a/.github/workflows/test_corpus.yaml b/.github/workflows/test_corpus.yaml index 1d11155..996240b 100644 --- a/.github/workflows/test_corpus.yaml +++ b/.github/workflows/test_corpus.yaml @@ -48,21 +48,23 @@ jobs: run: rm -rf "$GITHUB_WORKSPACE/*" - name: Checkout workflow ref - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 with: fetch-depth: 1 - show-progress: 'false' + show-progress: false path: workflow + persist-credentials: false - name: Checkout ref id: checkout-ref - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 with: fetch-depth: 1 - fetch-tags: 'true' - show-progress: 'false' + fetch-tags: true + show-progress: false ref: ${{ matrix.ref }} path: python-minifier + persist-credentials: false - name: Run tests uses: dflook/run-in-container@main @@ -106,31 +108,34 @@ jobs: run: rm -rf "$GITHUB_WORKSPACE/*" - name: Checkout workflow ref - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 with: path: workflow fetch-depth: 1 - show-progress: 'false' + show-progress: false + persist-credentials: false - name: Checkout ref id: ref - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 with: ref: ${{ inputs.ref }} path: python-minifier fetch-depth: 1 - fetch-tags: 'true' - show-progress: 'false' + fetch-tags: true + show-progress: false + persist-credentials: false - name: Checkout base ref id: base-ref - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 with: ref: ${{ inputs.base-ref }} path: python-minifier-base fetch-depth: 1 - fetch-tags: 'true' - show-progress: 'false' + fetch-tags: true + show-progress: false + persist-credentials: false - name: Generate Report uses: dflook/run-in-container@main diff --git a/.github/workflows/verify_release.yaml b/.github/workflows/verify_release.yaml index 8fc5810..b0bcf71 100644 --- a/.github/workflows/verify_release.yaml +++ b/.github/workflows/verify_release.yaml @@ -18,6 +18,8 @@ jobs: image: danielflook/python-minifier-build:python${{ matrix.python }}-2024-09-15 steps: - name: Test + env: + VERSION: ${{ inputs.version }} run: | - pip${{ matrix.python }} install python-minifier==${{ inputs.version }} + pip${{ matrix.python }} install "python-minifier==$VERSION" pyminify --version diff --git a/.github/workflows/xtest.yaml b/.github/workflows/xtest.yaml index f8e76fc..9012f47 100644 --- a/.github/workflows/xtest.yaml +++ b/.github/workflows/xtest.yaml @@ -16,11 +16,11 @@ jobs: run: rm -rf "$GITHUB_WORKSPACE/*" - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: fetch-depth: 1 - fetch-tags: 'true' - show-progress: 'false' + show-progress: false + persist-credentials: false - name: Set version statically run: |