chore: Release cfspeedtest version 2.0.1 #45
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
| name: Release | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| tags: | |
| - v[0-9]+.* | |
| jobs: | |
| create-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: taiki-e/create-gh-release-action@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| upload-assets: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - windows-latest | |
| include: | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| - target: universal-apple-darwin | |
| os: macos-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: taiki-e/upload-rust-binary-action@v1 | |
| with: | |
| bin: cfspeedtest | |
| target: ${{ matrix.target }} | |
| tar: unix | |
| zip: windows | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| docker-build-amd64: | |
| needs: [create-release, upload-assets] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push AMD64 Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| platforms: linux/amd64 | |
| push: true | |
| provenance: false | |
| tags: | | |
| cybuerg/cfspeedtest:${{ github.ref_name }}-amd64 | |
| cybuerg/cfspeedtest:latest-amd64 | |
| docker-build-arm64: | |
| needs: [create-release, upload-assets] | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Log in to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push ARM64 Docker image | |
| run: | | |
| docker build --platform linux/arm64 -t cybuerg/cfspeedtest:${{ github.ref_name }}-arm64 -t cybuerg/cfspeedtest:latest-arm64 . | |
| docker push cybuerg/cfspeedtest:${{ github.ref_name }}-arm64 | |
| docker push cybuerg/cfspeedtest:latest-arm64 | |
| docker-create-manifest: | |
| needs: [docker-build-amd64, docker-build-arm64] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Log in to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Create and push multi-arch manifest | |
| run: | | |
| # Create manifest for versioned tag | |
| docker manifest create cybuerg/cfspeedtest:${{ github.ref_name }} \ | |
| cybuerg/cfspeedtest:${{ github.ref_name }}-amd64 \ | |
| cybuerg/cfspeedtest:${{ github.ref_name }}-arm64 | |
| docker manifest push cybuerg/cfspeedtest:${{ github.ref_name }} | |
| # Create manifest for latest tag | |
| docker manifest create cybuerg/cfspeedtest:latest \ | |
| cybuerg/cfspeedtest:latest-amd64 \ | |
| cybuerg/cfspeedtest:latest-arm64 | |
| docker manifest push cybuerg/cfspeedtest:latest |