diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ef05c7f..564d344 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,47 +8,28 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + - uses: actions/checkout@v3 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - name: Run `nix bundle` + id: build + run: | + mkdir -p /out && cd /out + nix bundle \ + -o nvim.AppImage \ + --bundler github:ralismark/nix-appimage \ + --extra-experimental-features nix-command \ + --extra-experimental-features flakes .#full + nix bundle \ + -o nvim-minimal.AppImage \ + --bundler github:ralismark/nix-appimage \ + --extra-experimental-features nix-command \ + --extra-experimental-features flakes .#minimal + gzip *.AppImage - - name: Login to ghcr.io - uses: docker/login-action@v1 + - name: Upload bundle to release + uses: svenstaro/upload-release-action@v2 with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build container and push to ghcr.io - uses: docker/build-push-action@v2 - with: - push: true - tags: ghcr.io/iofq/nvim:latest - - - uses: shrink/actions-docker-extract@v1 - id: extract - with: - image: ghcr.io/iofq/nvim:latest - path: /out/neovim-x86_64-linux.AppImage - - - uses: shrink/actions-docker-extract@v1 - id: extract-minimal - with: - image: ghcr.io/iofq/nvim:latest - path: /out/neovim-x86_64-linux-minimal.AppImage - - - name: Upload archive to release - uses: xresloader/upload-to-github-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - file: ${{ steps.extract.outputs.destination }} - update_latest_release: true - overwrite: true - - - name: Upload archive to release - uses: xresloader/upload-to-github-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - file: ${{ steps.extract-minimal.outputs.destination }} - update_latest_release: true + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: /out/*.AppImage.gz overwrite: true