fix repo url #3
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 | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.target }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| # macOS | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| archive: tar.gz | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| archive: tar.gz | |
| # Linux | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| archive: tar.gz | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| archive: tar.gz | |
| # Windows | |
| - target: x86_64-pc-windows-msvc | |
| os: windows-latest | |
| archive: zip | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-action@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install cross-compilation tools | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-aarch64-linux-gnu | |
| - name: Build | |
| run: cargo build --release --target ${{ matrix.target }} | |
| - name: Package (Unix) | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| cd target/${{ matrix.target }}/release | |
| tar -czvf ../../../memorycli-${{ matrix.target }}.tar.gz memorycli | |
| cd ../../.. | |
| - name: Package (Windows) | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| cd target/${{ matrix.target }}/release | |
| 7z a ../../../memorycli-${{ matrix.target }}.zip memorycli.exe | |
| cd ../../.. | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: memorycli-${{ matrix.target }} | |
| path: memorycli-${{ matrix.target }}.${{ matrix.archive }} | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| memorycli-*/memorycli-* | |
| generate_release_notes: true | |
| # Update Homebrew tap | |
| homebrew: | |
| needs: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Update Homebrew formula | |
| uses: mislav/bump-homebrew-formula-action@v3 | |
| with: | |
| formula-name: memorycli | |
| homebrew-tap: memvid/homebrew-tap | |
| download-url: https://github.com/memvid/memory-cli/releases/download/${{ github.ref_name }}/memorycli-x86_64-apple-darwin.tar.gz | |
| env: | |
| COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} |