added direnv integration #47
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: "Upload source archives" | |
on: | |
push: | |
paths: | |
- 'sources/**' | |
- flake.nix | |
- flake.lock | |
jobs: | |
sources: | |
name: Build and upload sources to Cachix | |
runs-on: ubuntu-latest | |
environment: Cachix | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Nix | |
uses: cachix/install-nix-action@v20 | |
- name: Set up Cachix access | |
uses: cachix/cachix-action@v12 | |
with: | |
name: nix-wrap | |
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
pushFilter: "(-source|-man)$" | |
- name: Build and pin final output | |
run: | | |
nix build .#sources | |
cachix push nix-wrap $(nix eval --raw .#sources) | |
cachix pin nix-wrap sources $(nix eval --raw .#sources) --keep-forever |