Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,26 +74,26 @@ jobs:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true
- name: Checkout code
uses: actions/checkout@v5

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true

cross_platform:
name: Cross Platform Build
Expand Down
166 changes: 83 additions & 83 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,98 +253,98 @@ jobs:
tag_name: ${{ needs.semantic-version.outputs.version_tag }}
files: ${{ env.UNIVERSAL_ASSET }}

publish-crate:
name: Publish to crates.io
needs: [semantic-version, create-release, build-release, build-universal-macos]
# publish-crate:
# name: Publish to crates.io
# needs: [semantic-version, create-release, build-release, build-universal-macos]
# runs-on: ubuntu-latest
# if: needs.semantic-version.outputs.changed == 'true' && github.event_name == 'push' && !contains(needs.semantic-version.outputs.version, 'alpha') && !contains(needs.semantic-version.outputs.version, 'beta') && !contains(needs.semantic-version.outputs.version, 'rc')

# steps:
# - name: Checkout code
# uses: actions/checkout@v5
# with:
# ref: main
# fetch-depth: 1

# - name: Pull latest changes
# run: git pull origin main

# - name: Install Rust
# uses: dtolnay/rust-toolchain@stable

# - name: Cache dependencies
# uses: Swatinem/rust-cache@v2

# - name: Publish to crates.io
# run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
docker-release:
name: Build and Push Docker Image
needs: [semantic-version, create-release]
runs-on: ubuntu-latest
if: needs.semantic-version.outputs.changed == 'true' && github.event_name == 'push' && !contains(needs.semantic-version.outputs.version, 'alpha') && !contains(needs.semantic-version.outputs.version, 'beta') && !contains(needs.semantic-version.outputs.version, 'rc')

if: needs.semantic-version.outputs.changed == 'true' && github.event_name == 'push'
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 1

- name: Pull latest changes
run: git pull origin main

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Publish to crates.io
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
docker-release:
name: Build and Push Docker Image
needs: [semantic-version, create-release]
runs-on: ubuntu-latest
if: needs.semantic-version.outputs.changed == 'true' && github.event_name == 'push'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 1

- name: Pull latest changes
run: git pull origin main

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for 0.x versions
id: meta-prerelease
if: startsWith(needs.semantic-version.outputs.version, '0.')
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKER_USERNAME }}/repos
ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}},value=${{ needs.semantic-version.outputs.version }}
type=raw,value=latest

- name: Extract metadata for 1.x+ versions
id: meta-stable
if: "!startsWith(needs.semantic-version.outputs.version, '0.')"
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKER_USERNAME }}/repos
ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}},value=${{ needs.semantic-version.outputs.version }}
type=semver,pattern={{major}}.{{minor}},value=${{ needs.semantic-version.outputs.version }}
type=semver,pattern={{major}},value=${{ needs.semantic-version.outputs.version }}
type=raw,value=latest

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta-prerelease.outputs.tags || steps.meta-stable.outputs.tags }}
labels: ${{ steps.meta-prerelease.outputs.labels || steps.meta-stable.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false
sbom: false
build-args: |
VERSION=${{ needs.semantic-version.outputs.version }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for 0.x versions
id: meta-prerelease
if: startsWith(needs.semantic-version.outputs.version, '0.')
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKER_USERNAME }}/repos
ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}},value=${{ needs.semantic-version.outputs.version }}
type=raw,value=latest

- name: Extract metadata for 1.x+ versions
id: meta-stable
if: "!startsWith(needs.semantic-version.outputs.version, '0.')"
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKER_USERNAME }}/repos
ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}},value=${{ needs.semantic-version.outputs.version }}
type=semver,pattern={{major}}.{{minor}},value=${{ needs.semantic-version.outputs.version }}
type=semver,pattern={{major}},value=${{ needs.semantic-version.outputs.version }}
type=raw,value=latest

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta-prerelease.outputs.tags || steps.meta-stable.outputs.tags }}
labels: ${{ steps.meta-prerelease.outputs.labels || steps.meta-stable.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false
sbom: false
build-args: |
VERSION=${{ needs.semantic-version.outputs.version }}
Loading