Update kup package list (#116) #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Master Push' | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
nix-flake-release: | |
name: 'Nix flake release' | |
strategy: | |
matrix: | |
include: | |
- runner: ubuntu-latest | |
os: ubuntu-latest | |
- runner: macos-12 | |
os: macos-12 | |
- runner: MacM1 | |
os: self-macos-12 | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v3 | |
- name: 'Upgrade bash' | |
if: ${{ contains(matrix.os, 'macos') }} | |
run: brew install bash | |
- name: 'Install Nix/Cachix' | |
if: ${{ !startsWith(matrix.os, 'self') }} | |
uses: cachix/install-nix-action@v22 | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.13.3/install | |
extra_nix_config: | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- if: ${{ !startsWith(matrix.os, 'self') }} | |
uses: cachix/cachix-action@v12 | |
with: | |
name: k-framework | |
authToken: '${{ secrets.CACHIX_PUBLIC_TOKEN }}' | |
skipPush: true | |
- name: 'Build and cache kup' | |
uses: workflow/nix-shell-action@v3 | |
env: | |
GC_DONT_GC: 1 | |
CACHIX_AUTH_TOKEN: '${{ secrets.CACHIX_PUBLIC_TOKEN }}' | |
with: | |
packages: jq | |
script: | | |
kup=$(nix build .#kup --json | jq -r '.[].outputs | to_entries[].value') | |
drv=$(nix-store --query --deriver ${kup}) | |
nix-store --query --requisites --include-outputs ${drv} | cachix push k-framework |