nvim.nix/.github/workflows/main.yml
2024-01-28 20:01:43 -06:00

39 lines
1.2 KiB
YAML

name: build
on:
pull_request:
branches: [master]
types: [opened]
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- package_name: full
- package_name: minimal
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run `nix bundle`
id: build
run: |
nix bundle \
-o nvim-${{ matrix.package_name }}.AppImage \
--bundler github:ralismark/nix-appimage \
--extra-experimental-features nix-command \
--extra-experimental-features flakes .#${{ matrix.package_name }}
echo "Done building AppImage for nvim-${{ matrix.package_name }}"
- name: Upload bundle to release
if: github.ref == 'refs/heads/master'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "nvim-${{ matrix.package_name }}.AppImage"
asset_name: "nvim-x86_64-linux-${{ matrix.package_name }}.AppImage"
tag: latest
overwrite: true