diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f521865f..dc6f16f5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,6 +5,9 @@ on: branches: - master pull_request: +env: + ACTIONS_STEP_DEBUG: true + ACTIONS_RUNNER_DEBUG: true jobs: version: name: version @@ -60,19 +63,18 @@ jobs: runs-on: ubuntu-latest container: image: quay.io/pypa/manylinux_2_28_x86_64 - volumes: - - /opt/builds:/opt/builds steps: - uses: actions/checkout@v3 - name: Write version to init file run: | echo '${{ needs.version.outputs.init_contents }}' > src/ytdl_sub/__init__.py - - name: Install Python + - name: Install base packages run: | cat /etc/os-release dnf update -y - dnf install -y epel-release tar zstd - dnf install -y gcc openssl-devel bzip2-devel libffi-devel zlib-devel wget make + dnf install -y epel-release tar wget make gcc openssl-devel bzip2-devel libffi-devel zlib-devel + - name: Install Python + run: | wget https://www.python.org/ftp/python/3.10.10/Python-3.10.10.tar.xz tar -xf Python-3.10.10.tar.xz cd Python-3.10.10 && ./configure --with-ensurepip=install --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" @@ -86,14 +88,15 @@ jobs: # Build executable pyinstaller ytdl-sub.spec mkdir -p /opt/builds - chmod +x dist/ytdl-sub + chmod ugo+rwx dist/ytdl-sub dist/ytdl-sub -h mv dist/ytdl-sub /opt/builds/ytdl-sub_linux - - name: Save build to cache - uses: actions/cache@v3 + + - name: Upload build + uses: actions/upload-artifact@v3 with: + name: ytdl-sub_linux path: /opt/builds/ytdl-sub_linux - key: ${{ github.sha }}-linux build-arm: name: build-arm @@ -128,11 +131,11 @@ jobs: mv dist/ytdl-sub /builds/ytdl-sub_${{ matrix.arch }} cd /builds && ./ytdl-sub_${{ matrix.arch }} -h - - name: Save build to cache - uses: actions/cache@v3 + - name: Upload build + uses: actions/upload-artifact@v3 with: + name: ytdl-sub_${{ matrix.arch }} path: /opt/builds/ytdl-sub_${{ matrix.arch }} - key: ${{ github.sha }}-${{ matrix.arch }} ################################################################################################## @@ -149,33 +152,33 @@ jobs: run: | echo '${{ needs.version.outputs.init_contents }}' > src/ytdl_sub/__init__.py - - name: Restore linux build - uses: actions/cache@v3 + - name: Restore armv6 build + uses: actions/download-artifact@v3 with: - path: /opt/builds/ytdl-sub_linux - key: ${{github.sha}}-linux - fail-on-cache-miss: True - - - name: Restore aarch64 build - uses: actions/cache@v3 - with: - path: /opt/builds/ytdl-sub_aarch64 - key: ${{github.sha}}-aarch64 - fail-on-cache-miss: True + name: ytdl-sub_armv6 + path: /opt/builds/ytdl-sub_armv6 - name: Restore armv7 build - uses: actions/cache@v3 + uses: actions/download-artifact@v3 with: + name: ytdl-sub_armv7 path: /opt/builds/ytdl-sub_armv7 - key: ${{github.sha}}-armv7 - fail-on-cache-miss: True - - name: Restore armv6 build - uses: actions/cache@v3 + - name: Restore aarch64 build + uses: actions/download-artifact@v3 with: - path: /opt/builds/ytdl-sub_armv6 - key: ${{github.sha}}-armv6 - fail-on-cache-miss: True + name: ytdl-sub_aarch64 + path: /opt/builds/ytdl-sub_aarch64 + + - name: Restore linux build + uses: actions/download-artifact@v3 + with: + name: ytdl-sub_linux + path: /opt/builds/ytdl-sub_linux + + - name: Inspect build directory + run: | + ls -lh /opt/builds - name: Create Release if: ${{ github.ref == 'refs/heads/master' }}