Rename native token display to COOK #7
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 Cookie Chain CLI | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.target }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-14 | |
| target: aarch64-apple-darwin | |
| - os: ubuntu-24.04 | |
| target: x86_64-unknown-linux-gnu | |
| - os: ubuntu-24.04-arm | |
| target: aarch64-unknown-linux-gnu | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install Linux dependencies | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y build-essential clang llvm-dev libclang-dev libudev-dev pkg-config | |
| - name: Install macOS dependencies | |
| if: runner.os == 'macOS' | |
| run: brew install coreutils llvm | |
| - name: Configure Linux LLVM paths | |
| if: runner.os == 'Linux' | |
| run: | | |
| echo "LLVM_CONFIG_PATH=$(command -v llvm-config)" >> "$GITHUB_ENV" | |
| echo "LIBCLANG_PATH=$(llvm-config --libdir)" >> "$GITHUB_ENV" | |
| - name: Configure macOS LLVM paths | |
| if: runner.os == 'macOS' | |
| run: | | |
| LLVM_PREFIX="$(brew --prefix llvm)" | |
| echo "LLVM_CONFIG_PATH=${LLVM_PREFIX}/bin/llvm-config" >> "$GITHUB_ENV" | |
| echo "LIBCLANG_PATH=${LLVM_PREFIX}/lib" >> "$GITHUB_ENV" | |
| echo "CC=$(xcrun -f clang)" >> "$GITHUB_ENV" | |
| echo "CXX=$(xcrun -f clang++)" >> "$GITHUB_ENV" | |
| echo "AR=$(xcrun -f ar)" >> "$GITHUB_ENV" | |
| echo "RANLIB=$(xcrun -f ranlib)" >> "$GITHUB_ENV" | |
| - name: Build release tarball | |
| run: scripts/create-release-tarball.sh --target "${{ matrix.target }}" --channel-or-tag "${{ github.ref_name }}" --tarball-basename cookie-release | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cookie-release-${{ matrix.target }} | |
| path: | | |
| cookie-release-${{ matrix.target }}.tar.bz2 | |
| cookie-release-${{ matrix.target }}.yml | |
| cookie-install-init-${{ matrix.target }} | |
| release: | |
| name: Publish GitHub Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: build | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| files: artifacts/* |