name: Build and Release Binaries on: push: tags: - "**" workflow_dispatch: env: BINARY-PATH: build/legionlinuxtui permissions: contents: write jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: token: ${{ secrets.GH_API_KEY }} fetch-depth: 0 - uses: cachix/install-nix-action@v31 with: github_access_token: ${{ secrets.GH_API_KEY }} - name: build run: | nix develop --impure -c make build - name: Upload artifact uses: actions/upload-artifact@v4 with: name: legionlinuxtui path: ${{ env.BINARY-PATH }} - name: generate changelog run: | nix develop -c git-cliff --current > CHANGELOG.md - name: Upload to GitHub Release uses: softprops/action-gh-release@v2 with: body_path: CHANGELOG.md draft: false prerelease: false files: ${{ env.BINARY-PATH }} generate_release_notes: true make_latest: true env: GITHUB_TOKEN: ${{ secrets.GH_API_KEY }}