-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.26 KB
/
build.yml
File metadata and controls
50 lines (41 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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