chore(version): v0.24.0 #1027
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
| name: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "*" | |
| pull_request: | |
| merge_group: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| SENTRY_DSN: ${{ vars.SENTRY_DSN }} | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: [x86_64, x86, aarch64] # armv7, s390x, ppc64le | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| args: --release --out dist -i python3.8 | |
| sccache: "true" | |
| manylinux: auto | |
| docker-options: -e SENTRY_DSN | |
| env: | |
| # Workaround ring 0.17 build issue | |
| CFLAGS_aarch64_unknown_linux_gnu: "-D__ARM_ARCH=8" | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-ubuntu-${{ matrix.target }} | |
| path: dist | |
| windows: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| target: [x64, x86] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.8" | |
| architecture: ${{ matrix.target }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| args: --release --out dist | |
| sccache: "true" | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-windows-${{ matrix.target }} | |
| path: dist | |
| macos: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| target: [x86_64, aarch64] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.8" | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| args: --release --out dist | |
| sccache: "true" | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-macos-${{ matrix.target }} | |
| path: dist | |
| sdist: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build sdist | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| command: sdist | |
| args: --out dist | |
| - name: Upload sdist | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-sdist | |
| path: dist | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| needs: [linux, windows, macos, sdist] | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: wheels-* | |
| merge-multiple: true | |
| - name: Publish to PyPI | |
| uses: PyO3/maturin-action@v1 | |
| if: "startsWith(github.ref, 'refs/tags/')" | |
| env: | |
| MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
| with: | |
| command: upload | |
| args: --non-interactive --skip-existing * | |
| docker: | |
| name: Build and Push Docker Image | |
| runs-on: ubuntu-latest | |
| needs: [release] | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Docker setup | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Docker login | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Docker meta kubimo | |
| id: meta-kubimo | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/aqora-io/cli-kubimo | |
| bake-target: docker-metadata-kubimo | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=pr | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{major}} | |
| - name: Build and push | |
| uses: docker/bake-action@v6 | |
| with: | |
| set: | | |
| kubimo*.cache-from=type=registry,ref=ghcr.io/aqora-io/cli-kubimo:latest | |
| *.cache-to=type=inline | |
| files: | | |
| ./docker-bake.hcl | |
| cwd://${{ steps.meta-kubimo.outputs.bake-file }} | |
| push: ${{ github.event_name != 'pull_request' }} | |
| npm: | |
| name: Build and publish npm package | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "Setup node" | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| registry-url: "https://npm.pkg.github.com" | |
| - name: Run sccache-cache | |
| uses: mozilla-actions/[email protected] | |
| - name: Set Rust caching env vars | |
| run: | | |
| echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV | |
| echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | |
| - name: Install wasm-pack | |
| run: cargo install wasm-pack | |
| - name: Build package | |
| run: | | |
| cargo test export_bindings --no-default-features --features "wasm-test" | |
| wasm-pack build --target web --out-name index --scope "${{ github.repository_owner }}" --release --weak-refs --reference-types --no-default-features --features default-wasm | |
| sh configure-pkg.sh "${{ github.server_url }}/${{ github.repository }}" | |
| working-directory: data-utils | |
| - name: Publish to Github NPM package registry dry run | |
| run: npm publish --dry-run | |
| working-directory: data-utils/pkg | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish to Github NPM package registry | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: npm publish | |
| working-directory: data-utils/pkg | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |