Skip to content

Build

Build #8

Workflow file for this run

name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
workflow_run:
workflows: ["Update GitHub Copilot CLI Version"]
types: [completed]
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
env:
NIX_FIRST_BUILD_UID: 400
- name: Check flake
run: nix flake check --print-build-logs
- name: Build github-copilot-cli
run: nix build .#github-copilot-cli -o result --print-build-logs
- name: Verify package contents
run: test -x ./result/bin/copilot
- name: Run basic functionality test
run: ./result/bin/copilot --version