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.

Switch to tangled CI

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