0.3.10 #249
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: Artifacts | |
| on: | |
| release: | |
| types: | |
| - published | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Allow the workflow to access the files of the repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Use an intelligent Rust cache for building the project | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build the release version of `rudof` for the x86 architecture | |
| run: cargo build --release | |
| - name: Upload the generated Artifact for it to be stored in its corresponding release (x86) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ vars.BINARY_NAME }}_x86_64_linux_gnu | |
| path: target/release/${{ vars.BINARY_NAME }} | |
| - name: Rename the binary according to the version and architecture | |
| run: mv target/release/${{ vars.BINARY_NAME }} ${{ vars.BINARY_NAME }}_${{ github.event.release.tag_name }}_x86_64_linux_gnu | |
| - name: Upload the generated binaries to their corresponding release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| ${{ vars.BINARY_NAME }}_${{ github.event.release.tag_name }}_x86_64_linux_gnu | |
| mac: | |
| runs-on: ${{ matrix.vm }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64 | |
| vm: macos-15-intel | |
| - target: aarch64 | |
| vm: macos-latest | |
| env: | |
| MACOSX_DEPLOYMENT_TARGET: '12.0' | |
| steps: | |
| - name: Allow the workflow to access the files of the repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-apple-darwin | |
| - name: Use an intelligent Rust cache for building the project | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build the release version of `rudof` for x86_64 | |
| if: matrix.target == 'x86_64' | |
| run: cargo build --release | |
| - name: Build the release version of `rudof` for aarch64 | |
| if: matrix.target == 'aarch64' | |
| run: cargo build --release --target aarch64-apple-darwin | |
| - name: Upload the generated Artifact (x86_64) | |
| if: matrix.target == 'x86_64' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ vars.BINARY_NAME }}_x86_64_apple | |
| path: target/release/${{ vars.BINARY_NAME }} | |
| - name: Upload the generated Artifact (aarch64) | |
| if: matrix.target == 'aarch64' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ vars.BINARY_NAME }}_aarch64_apple | |
| path: target/aarch64-apple-darwin/release/${{ vars.BINARY_NAME }} | |
| - name: Rename the binary (x86_64) | |
| if: matrix.target == 'x86_64' | |
| run: mv target/release/${{ vars.BINARY_NAME }} ${{ vars.BINARY_NAME }}_${{ github.event.release.tag_name }}_x86_64_apple | |
| - name: Rename the binary (aarch64) | |
| if: matrix.target == 'aarch64' | |
| run: mv target/aarch64-apple-darwin/release/${{ vars.BINARY_NAME }} ${{ vars.BINARY_NAME }}_${{ github.event.release.tag_name }}_aarch64_apple | |
| - name: Upload the generated binaries to their corresponding release (x86_64) | |
| if: matrix.target == 'x86_64' | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: ${{ vars.BINARY_NAME }}_${{ github.event.release.tag_name }}_x86_64_apple | |
| - name: Upload the generated binaries to their corresponding release (aarch64) | |
| if: matrix.target == 'aarch64' | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: ${{ vars.BINARY_NAME }}_${{ github.event.release.tag_name }}_aarch64_apple | |
| windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Allow the workflow to access the files of the repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install OpenSSL | |
| run: | | |
| Get-Command openssl | |
| openssl version | |
| dir "C:\Program Files\OpenSSL\lib" | |
| echo "OPENSSL_LIB_DIR=C:/Program Files/OpenSSL/lib" >> $env:GITHUB_ENV | |
| echo "OPENSSL_DIR=C:/Program Files/OpenSSL/" >> $env:GITHUB_ENV | |
| echo "OPENSSL_INCLUDE_DIR=C:/Program Files/OpenSSL/include" >> $env:GITHUB_ENV | |
| - name: Install stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Use an intelligent Rust cache for building the project | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Remove the MySys64 libraries and utilities | |
| run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse | |
| - name: Build the release version of `rudof` for the x86 architecture | |
| run: cargo build --release | |
| - name: Upload the generated Artifact for it to be stored in its corresponding release (x86) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ vars.BINARY_NAME }}_x86_64_windows_msvc | |
| path: target/release/${{ vars.BINARY_NAME }}.exe | |
| - name: Rename the binary according to the version and architecture | |
| run: mv target/release/${{ vars.BINARY_NAME }}.exe ${{ vars.BINARY_NAME }}_${{ github.event.release.tag_name }}_x86_64_windows_msvc.exe | |
| - name: Upload the generated binary to its corresponding release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: ${{ vars.BINARY_NAME }}_${{ github.event.release.tag_name }}_x86_64_windows_msvc.exe | |
| deb: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Allow the workflow to access the files of the repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Use an intelligent Rust cache for building the project | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo deb | |
| run: cargo install cargo-deb | |
| - name: Build the .deb file using cargo deb | |
| run: cargo deb | |
| - name: Upload the .deb Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ vars.BINARY_NAME }} | |
| path: target/debian/*.deb | |
| - name: Rename the binary according to the version and architecture | |
| run: mv target/debian/*.deb ${{ vars.BINARY_NAME }}_${{ github.event.release.tag_name }}_amd64.deb | |
| - name: Upload the generated binary to its corresponding release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: ${{ vars.BINARY_NAME }}_${{ github.event.release.tag_name }}_amd64.deb | |
| rpm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Allow the workflow to access the files of the repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Use an intelligent Rust cache for building the project | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo-generate-rpm | |
| run: cargo install cargo-generate-rpm | |
| - name: Build the release version of `rudof` | |
| run: cargo build --release | |
| - name: Generate the .rpm package using cargo-generate-rpm | |
| run: cargo generate-rpm -p rudof_cli | |
| - name: Upload the .rpm Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ vars.BINARY_NAME }}_x86_64_rpm | |
| path: target/generate-rpm/*.rpm | |
| - name: Rename the RPM according to the version and architecture | |
| run: mv target/generate-rpm/*.rpm ${{ vars.BINARY_NAME }}_${{ github.event.release.tag_name }}_x86_64.rpm | |
| - name: Upload the generated RPM to its corresponding release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: ${{ vars.BINARY_NAME }}_${{ github.event.release.tag_name }}_x86_64.rpm | |
| docker: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Allow the workflow to access the files of the repository | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: true | |
| context: . | |
| file: ./Dockerfile_rudof | |
| no-cache: true | |
| tags: | | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ vars.BINARY_NAME }}:latest | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ vars.BINARY_NAME }}:${{ github.event.release.tag_name }} | |
| ghcr.io/${{ github.repository_owner }}/${{ vars.BINARY_NAME }}:latest | |
| ghcr.io/${{ github.repository_owner }}/${{ vars.BINARY_NAME }}:${{ github.event.release.tag_name }} |