Bump actions/download-artifact from 7 to 8 #182
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: [push, pull_request, release] | |
| name: build | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| go-version: [1.25.x] | |
| os: [ubuntu-24.04, macos-latest, windows-latest] | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15.0-alpha.5"] | |
| targetplatform: [x64] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Install Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| cache: false | |
| - name: Install Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Get dependencies | |
| run: | | |
| env GO111MODULE=on go vet ./... | |
| pip install coverage | |
| - name: Build | |
| run: go build -v . | |
| - name: Test on Windows | |
| env: | |
| CGO_ENABLED: 1 | |
| if: matrix.os == 'windows-latest' | |
| run: go build -buildmode=c-shared -o libexcelize.amd64.windows.dll main.go && coverage run -m unittest | |
| - name: Test on Linux | |
| env: | |
| CGO_ENABLED: 1 | |
| if: matrix.os == 'ubuntu-24.04' | |
| run: go build -buildmode=c-shared -o libexcelize.amd64.linux.so main.go && coverage run -m unittest | |
| - name: Test on macOS | |
| env: | |
| CGO_ENABLED: 1 | |
| if: matrix.os == 'macos-latest' | |
| run: go build -buildmode=c-shared -o libexcelize.arm64.darwin.dylib main.go && coverage run -m unittest | |
| - name: Codecov | |
| uses: codecov/codecov-action@v5 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| flags: unittests | |
| name: codecov-umbrella | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| needs: [test] | |
| if: github.event_name == 'release' && github.event.action == 'published' | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04, ubuntu-24.04-arm, macos-latest] | |
| steps: | |
| - name: Install Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.25.x | |
| cache: false | |
| - name: Install Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.9" | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Get dependencies | |
| run: | | |
| env GO111MODULE=on go vet ./... | |
| pip install coverage | |
| - name: Build Linux Shared Library | |
| if: matrix.os == 'ubuntu-24.04' | |
| env: | |
| CGO_ENABLED: 1 | |
| run: | | |
| docker run --rm -v $PWD:/src -w /src quay.io/pypa/manylinux2014_x86_64 bash -c " | |
| yum install -y wget || true | |
| wget https://go.dev/dl/go1.25.7.linux-amd64.tar.gz && \ | |
| tar -C /usr/local -xzf go1.25.7.linux-amd64.tar.gz && \ | |
| export PATH=/usr/local/go/bin:\$PATH && \ | |
| CGO_ENABLED=1 CC=gcc GOOS=linux GOARCH=amd64 \ | |
| go build -buildmode=c-shared -ldflags='-s -w' -trimpath \ | |
| -o libexcelize.amd64.linux.so main.go && \ | |
| rm -f libexcelize.*.h | |
| " | |
| docker run --rm -v $PWD:/src -w /src quay.io/pypa/manylinux2014_i686 bash -c " | |
| yum install -y wget || true | |
| wget https://go.dev/dl/go1.25.7.linux-386.tar.gz && \ | |
| tar -C /usr/local -xzf go1.25.7.linux-386.tar.gz && \ | |
| export PATH=/usr/local/go/bin:\$PATH && \ | |
| CGO_ENABLED=1 CC=gcc GOOS=linux GOARCH=386 \ | |
| go build -buildmode=c-shared -ldflags='-s -w' -trimpath \ | |
| -o libexcelize.386.linux.so main.go && \ | |
| rm -f libexcelize.*.h | |
| " | |
| - name: Build Linux ARM64 Shared Library | |
| if: matrix.os == 'ubuntu-24.04-arm' | |
| env: | |
| CGO_ENABLED: 1 | |
| run: | | |
| docker run --rm -v $PWD:/src -w /src quay.io/pypa/manylinux2014_aarch64 bash -c " | |
| yum install -y wget || true | |
| wget https://go.dev/dl/go1.25.7.linux-arm64.tar.gz && \ | |
| tar -C /usr/local -xzf go1.25.7.linux-arm64.tar.gz && \ | |
| export PATH=/usr/local/go/bin:\$PATH && \ | |
| CGO_ENABLED=1 CC=gcc GOOS=linux GOARCH=arm64 \ | |
| go build -buildmode=c-shared -ldflags='-s -w' -trimpath \ | |
| -o libexcelize.arm64.linux.so main.go && \ | |
| rm -f libexcelize.*.h | |
| " | |
| - name: Build Shared Library | |
| if: matrix.os == 'macos-latest' | |
| env: | |
| CGO_ENABLED: 1 | |
| run: | | |
| wget https://github.com/mstorsjo/llvm-mingw/releases/download/20260224/llvm-mingw-20260224-ucrt-macos-universal.tar.xz | |
| tar -xzf llvm-mingw-20260224-ucrt-macos-universal.tar.xz | |
| export PATH="$(pwd)/llvm-mingw-20260224-ucrt-macos-universal/bin:$PATH" | |
| CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -buildmode=c-shared -trimpath -o libexcelize.amd64.windows.dll main.go | |
| CC=i686-w64-mingw32-gcc GOOS=windows GOARCH=386 go build -ldflags "-s -w" -buildmode=c-shared -trimpath -o libexcelize.386.windows.dll main.go | |
| CC=aarch64-w64-mingw32-gcc GOOS=windows GOARCH=arm64 go build -ldflags "-s -w" -buildmode=c-shared -trimpath -o libexcelize.arm64.windows.dll main.go | |
| CC=gcc GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w" -buildmode=c-shared -trimpath -o libexcelize.arm64.darwin.dylib main.go | |
| CC=gcc GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -buildmode=c-shared -trimpath -o libexcelize.amd64.darwin.dylib main.go | |
| rm -f libexcelize.*.h | |
| - name: Upload Linux Artifacts | |
| if: matrix.os == 'ubuntu-24.04' | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: linux-artifacts | |
| path: | | |
| libexcelize.386.linux.so | |
| libexcelize.amd64.linux.so | |
| - name: Upload Linux ARM64 Artifacts | |
| if: matrix.os == 'ubuntu-24.04-arm' | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: linux-arm64-artifacts | |
| path: | | |
| libexcelize.arm64.linux.so | |
| - name: Upload Darwin Artifacts | |
| if: matrix.os == 'macos-latest' | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: darwin-artifacts | |
| path: | | |
| libexcelize.amd64.windows.dll | |
| libexcelize.386.windows.dll | |
| libexcelize.arm64.windows.dll | |
| libexcelize.arm64.darwin.dylib | |
| libexcelize.amd64.darwin.dylib | |
| publish: | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/excelize | |
| permissions: | |
| id-token: write | |
| if: github.event_name == 'release' && github.event.action == 'published' | |
| steps: | |
| - name: Install Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.9" | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| merge-multiple: true | |
| path: ./ | |
| - name: Build Python Package | |
| run: | | |
| pip install build setuptools wheel | |
| python -m build | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |