upload artifacts needs to match tarball #10
Workflow file for this run
This file contains 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
name: Build | |
on: | |
push: | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
description: 'Run the build with tmate set "debug_enabled"' | |
type: boolean | |
required: false | |
default: false | |
defaults: | |
run: | |
shell: bash | |
permissions: | |
contents: write | |
env: | |
BUILDKIT_PROGRESS: plain | |
jobs: | |
tests: | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
dbversion: ["5.7.44", "8.0.36", "8.4.0"] | |
arch: ["amd64", "arm64"] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@v3 | |
with: | |
limit-access-to-actor: true | |
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
- name: Run basic docker container | |
run: | | |
docker run --rm debian:bookworm bash -c 'arch && cat /etc/*release*' | |
- name: Set up for multi-arch | |
run: sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | |
- name: Build mysql clients | |
run: | | |
./build-clients.sh --mysql-version ${{ matrix.dbversion }} --arch ${{ matrix.arch }} | |
- name: "Tar up the binaries" | |
run: | | |
MYSQL_VERSION="${{ matrix.dbversion }}" | |
# Remove the patch version from the tarball name | |
MINOR_MYSQL_VERSION=${MYSQL_VERSION%.*} | |
tar -C ./mysql_${{ matrix.dbversion }}/built_${{ matrix.dbversion }}_${{ matrix.arch }}/bin/ -czf ./mysql-${MINOR_MYSQL_VERSION}-${{ matrix.arch }}.tar.gz . | |
- name: "upload mysql-${{ matrix.dbversion }}-${{ matrix.arch }}" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mysql-${{ matrix.dbversion }}-${{ matrix.arch }} | |
path: ./mysql-*-${{ matrix.arch }}.tar.gz | |
# - name: Setup tmate session | |
# if: ${{ failure() }} | |
# uses: mxschmitt/action-tmate@v3 | |
release: | |
runs-on: ubuntu-24.04 | |
needs: tests | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: ./artifacts | |
- name: Show content of ./artifacts | |
run: ls -lR ./artifacts || true | |
- name: Add files to release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: ./artifacts/*/*.tar.gz | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Setup tmate session | |
# if: ${{ failure() }} | |
# uses: mxschmitt/action-tmate@v3 |