Skip to content

Commit

Permalink
test new workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
iofq committed Jan 29, 2024
1 parent 1d10de7 commit fecb822
Showing 1 changed file with 22 additions and 41 deletions.
63 changes: 22 additions & 41 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit fecb822

Please sign in to comment.