fix: live reloading for ghostty and helix #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*" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust build artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Compute artifact names | |
| shell: bash | |
| run: | | |
| echo "TARGET=$(rustc -vV | sed -n 's/^host: //p')" >> "$GITHUB_ENV" | |
| echo "VERSION=${GITHUB_REF_NAME}" >> "$GITHUB_ENV" | |
| - name: Build release binary | |
| run: cargo build --locked --release | |
| - name: Package release archive | |
| shell: bash | |
| run: | | |
| ARCHIVE_BASENAME="hue-${VERSION}-${TARGET}" | |
| rm -rf dist | |
| mkdir -p dist | |
| cp target/release/hue "dist/hue" | |
| cp README.md "dist/README.md" | |
| tar -C dist -czf "${ARCHIVE_BASENAME}.tar.gz" . | |
| shasum -a 256 "${ARCHIVE_BASENAME}.tar.gz" > "${ARCHIVE_BASENAME}.tar.gz.sha256" | |
| - name: Upload release artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-${{ env.TARGET }} | |
| path: | | |
| hue-${{ env.VERSION }}-${{ env.TARGET }}.tar.gz | |
| hue-${{ env.VERSION }}-${{ env.TARGET }}.tar.gz.sha256 | |
| publish: | |
| name: Publish GitHub release | |
| runs-on: ubuntu-latest | |
| needs: build | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download release artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: release-artifacts | |
| pattern: release-* | |
| merge-multiple: true | |
| - name: Publish release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: release-artifacts/* | |
| generate_release_notes: true |