Skip to content

Commit 37eaaa2

Browse files
committed
Refactor slightly
1 parent c7bbe07 commit 37eaaa2

File tree

1 file changed

+35
-53
lines changed

1 file changed

+35
-53
lines changed

.github/workflows/build-universal-neovim.yml

Lines changed: 35 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -6,75 +6,57 @@ on:
66
- neovim-v[0-9]+.[0-9]+.[0-9]+-*
77

88
jobs:
9-
macos:
10-
strategy:
11-
fail-fast: true
12-
matrix:
13-
runner: [ macos-15-intel, macos-15 ]
14-
include:
15-
- runner: macos-15-intel
16-
arch: x86_64
17-
- runner: macos-15
18-
arch: arm64
19-
runs-on: ${{ matrix.runner }}
9+
build-x86:
10+
runs-on: macos-15-intel
2011
steps:
2112
- uses: actions/checkout@v4
2213
with:
23-
# Perform a full checkout #13471
2414
fetch-depth: 0
2515
submodules: true
26-
- name: Install dependencies
27-
run: brew bundle
28-
29-
- name: Build neovim
30-
run: clean=true ./bin/neovim/bin/build_neovim.sh
16+
- run: brew bundle
17+
- run: clean=true ./bin/neovim/bin/build_neovim.sh
18+
- uses: actions/upload-artifact@v4
19+
with:
20+
name: nvim-macos-x86_64
21+
path: Neovim/build/nvim-macos-x86_64.tar.gz
22+
retention-days: 1
3123

24+
build-arm:
25+
runs-on: macos-15
26+
steps:
27+
- uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
submodules: true
31+
- run: brew bundle
32+
- run: clean=true ./bin/neovim/bin/build_neovim.sh
3233
- uses: actions/upload-artifact@v4
3334
with:
34-
name: nvim-macos-${{ matrix.arch }}
35-
path: Neovim/build/nvim-macos-${{ matrix.arch }}.tar.gz
35+
name: nvim-macos-arm64
36+
path: Neovim/build/nvim-macos-arm64.tar.gz
3637
retention-days: 1
3738

3839
publish:
39-
needs: [macos]
40+
needs: [build-x86, build-arm]
4041
runs-on: macos-15
41-
env:
42-
GH_REPO: ${{ github.repository }}
43-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4442
permissions:
4543
contents: write
4644
steps:
47-
# Must perform checkout first, since it deletes the target directory
48-
# before running, and would therefore delete the downloaded artifacts
4945
- uses: actions/checkout@v4
5046
with:
5147
fetch-depth: 0
52-
5348
- uses: actions/download-artifact@v4
54-
55-
- name: Install dependencies
56-
run: brew bundle
57-
58-
- name: Set tag name env
59-
run: |
60-
TAG_NAME=${{ github.ref }}
61-
echo "TAG_NAME=${TAG_NAME#refs/tags/}" >> $GITHUB_ENV
62-
63-
- name: Move downloaded artifacts
64-
run: |
65-
mv nvim-macos-x86_64/* .
66-
mv nvim-macos-arm64/* .
67-
rm -r nvim-macos-x86_64
68-
rm -r nvim-macos-arm64
69-
70-
- name: Create universal Neovim
71-
run: ./bin/neovim/bin/build_universal_neovim.sh
72-
73-
# Set as prerelease such that the latest VimR release is marked as the latest stable release
74-
- name: Publish release
75-
run: |
76-
gh release create $TAG_NAME \
77-
--prerelease \
78-
--title "Universal ${TAG_NAME}" \
79-
--notes "Neovim universal build with `libintl`, not signed." \
80-
--target $GITHUB_SHA nvim-macos-x86_64.tar.gz nvim-macos-arm64.tar.gz nvim-macos-universal.tar.bz
49+
- run: brew bundle
50+
- run: |
51+
mv nvim-macos-*/* .
52+
rm -r nvim-macos-x86_64 nvim-macos-arm64
53+
- run: ./bin/neovim/bin/build_universal_neovim.sh
54+
- run: |
55+
gh release create ${{ github.ref_name }} \
56+
--prerelease \
57+
--title "Universal ${{ github.ref_name }}" \
58+
--notes "Neovim universal build with libintl, not signed." \
59+
--target ${{ github.sha }} \
60+
nvim-macos-x86_64.tar.gz nvim-macos-arm64.tar.gz nvim-macos-universal.tar.bz
61+
env:
62+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)