Connect applications to schemes, filetypes, and more on macOS (more to come)
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

rewrote the ci in CUE

+129
+129
.config/ci/release/github-ci.cue
··· 1 + package release 2 + 3 + workflows: release: { 4 + name: "Release" 5 + on: push: tags: ["*"] 6 + defaults: run: shell: "bash" 7 + env: { 8 + RUSTFLAGS: "--deny warnings" 9 + BINARY_NAME: "infat" 10 + } 11 + jobs: { 12 + prerelease: { 13 + "runs-on": "ubuntu-latest" 14 + outputs: value: "${{ steps.prerelease.outputs.value }}" 15 + steps: [{ 16 + name: "Prerelease Check" 17 + id: "prerelease" 18 + run: """ 19 + tag=${GITHUB_REF##*/} 20 + if [[ "$tag" =~ -(alpha|beta)$ ]]; then 21 + echo "value=true" >> $GITHUB_OUTPUT 22 + else 23 + echo "value=false" >> $GITHUB_OUTPUT 24 + fi 25 + """ 26 + }] 27 + } 28 + 29 + package: { 30 + strategy: { 31 + "fail-fast": false 32 + matrix: { 33 + target: [ 34 + "aarch64-apple-darwin", 35 + "x86_64-apple-darwin", 36 + ] 37 + include: [{ 38 + target: "aarch64-apple-darwin" 39 + os: "macos-latest" 40 + }, { 41 + target: "x86_64-apple-darwin" 42 + os: "macos-latest" 43 + }] 44 + } 45 + } 46 + "runs-on": "${{ matrix.os }}" 47 + needs: ["prerelease"] 48 + environment: name: "main" 49 + steps: [{ 50 + name: "Checkout code" 51 + uses: "actions/checkout@v4" 52 + }, { 53 + name: "Install Nix" 54 + uses: "cachix/install-nix-action@v27" 55 + with: { 56 + extra_nix_config: "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" 57 + } 58 + }, { 59 + name: "Cache Cargo registry and git" 60 + uses: "actions/cache@v4" 61 + with: { 62 + path: """ 63 + ~/.cargo/registry/index 64 + ~/.cargo/registry/cache 65 + ~/.cargo/git/db 66 + """ 67 + key: "${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}" 68 + "restore-keys": "${{ runner.os }}-cargo-registry-" 69 + } 70 + }, { 71 + name: "Build and Package" 72 + run: "nix develop --command just package ${{ matrix.target }}" 73 + }, { 74 + name: "Extract changelog for the tag" 75 + run: "nix develop --command just create-notes ${{ github.ref_name }} release_notes.md CHANGELOG.md" 76 + }, { 77 + name: "Publish Release" 78 + uses: "softprops/action-gh-release@v2" 79 + if: "startsWith(github.ref, 'refs/tags/')" 80 + with: { 81 + files: "dist/${{ env.BINARY_NAME }}-${{ matrix.target }}.tar.gz" 82 + body_path: "release_notes.md" 83 + draft: false 84 + make_latest: true 85 + prerelease: "${{ needs.prerelease.outputs.value }}" 86 + token: "${{ secrets.PAT }}" 87 + } 88 + }] 89 + } 90 + 91 + checksum: { 92 + "runs-on": "ubuntu-latest" 93 + needs: ["package", "prerelease"] 94 + if: "startsWith(github.ref, 'refs/tags/')" 95 + environment: name: "main" 96 + steps: [{ 97 + name: "Install Nix" 98 + uses: "cachix/install-nix-action@v27" 99 + with: { 100 + extra_nix_config: "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" 101 + } 102 + }, { 103 + name: "Download Release Archives" 104 + env: { 105 + GH_TOKEN: "${{ secrets.PAT }}" 106 + TAG_NAME: "${{ github.ref_name }}" 107 + } 108 + run: """ 109 + nix develop --command gh release download "$TAG_NAME" \\ 110 + --repo "$GITHUB_REPOSITORY" \\ 111 + --pattern '*' \\ 112 + --dir dist 113 + """ 114 + }, { 115 + name: "Generate Checksums" 116 + run: "nix develop --command just checksum dist" 117 + }, { 118 + name: "Publish Checksums" 119 + uses: "softprops/action-gh-release@v2" 120 + with: { 121 + files: "dist/*.sum" 122 + draft: false 123 + prerelease: "${{ needs.prerelease.outputs.value }}" 124 + token: "${{ secrets.PAT }}" 125 + } 126 + }] 127 + } 128 + } 129 + }