aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/release.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/release.yml')
-rw-r--r--.github/workflows/release.yml160
1 files changed, 43 insertions, 117 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1df33962e5..b19019d06d 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -17,124 +17,57 @@ on:
jobs:
linux:
runs-on: ubuntu-20.04
+ env:
+ CC: gcc-10
outputs:
version: ${{ steps.build.outputs.version }}
- release: ${{ steps.build.outputs.release }}
steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- - name: Install dependencies
- run: |
- sudo apt-get update
- sudo apt-get install -y autoconf automake build-essential cmake gettext libtool-bin locales ninja-build pkg-config unzip
+ - uses: actions/checkout@v4
+ - run: ./.github/scripts/install_deps.sh
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
- run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
+ run: |
+ echo 'NVIM_BUILD_TYPE=Release' >> $GITHUB_ENV
+ echo 'APPIMAGE_TAG=latest' >> $GITHUB_ENV
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
- run: printf 'NVIM_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV
- - name: Build release
- id: build
run: |
- CC=gcc-10 make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH="
- printf 'version<<END\n' >> $GITHUB_OUTPUT
- ./build/bin/nvim --version | head -n 3 >> $GITHUB_OUTPUT
- printf 'END\n' >> $GITHUB_OUTPUT
- printf 'release=%s\n' "$(./build/bin/nvim --version | head -n 1)" >> $GITHUB_OUTPUT
- make DESTDIR="$GITHUB_WORKSPACE/build/release/nvim-linux64" install
- cd "$GITHUB_WORKSPACE/build/"
- cpack -C $NVIM_BUILD_TYPE
+ echo 'NVIM_BUILD_TYPE=RelWithDebInfo' >> $GITHUB_ENV
+ echo 'APPIMAGE_TAG=nightly' >> $GITHUB_ENV
+ - name: appimage
+ run: ./scripts/genappimage.sh ${APPIMAGE_TAG}
+ - name: tar.gz
+ run: cpack --config build/CPackConfig.cmake -G TGZ
- uses: actions/upload-artifact@v3
with:
- name: nvim-linux64
+ name: appimage
path: |
- build/nvim-linux64.tar.gz
- build/nvim-linux64.deb
+ build/bin/nvim.appimage
+ build/bin/nvim.appimage.zsync
retention-days: 1
-
- appimage:
- runs-on: ubuntu-20.04
- container:
- image: ubuntu:18.04
- options: --privileged # Privileged mode is needed to load fuse module.
- steps:
- - name: Prepare container
- run: |
- apt-get update
- apt-get install -y software-properties-common
- add-apt-repository -y ppa:ubuntu-toolchain-r/test # For gcc-10.
- add-apt-repository -y ppa:git-core/ppa # For git>=2.18.
- apt-get update
- apt-get install -y git gcc-10
- apt-get install -y fuse libfuse2 # For linuxdeploy.
- # Workaround for https://github.com/actions/checkout/issues/766.
- git config --global --add safe.directory "$GITHUB_WORKSPACE"
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- - name: Install dependencies
- run: |
- apt-get update
- apt-get install -y autoconf automake build-essential cmake gettext libtool-bin locales ninja-build pkg-config unzip
- - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
- run: CC=gcc-10 make appimage-latest
- - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
- run: CC=gcc-10 make appimage-nightly
- uses: actions/upload-artifact@v3
with:
- name: appimage
+ name: nvim-linux64
path: |
- build/bin/nvim.appimage
- build/bin/nvim.appimage.zsync
+ build/nvim-linux64.tar.gz
retention-days: 1
+ - name: Export version
+ id: build
+ run: |
+ printf 'version<<END\n' >> $GITHUB_OUTPUT
+ ./build/bin/nvim --version | head -n 3 >> $GITHUB_OUTPUT
+ printf 'END\n' >> $GITHUB_OUTPUT
macOS:
runs-on: macos-11
steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- - name: Install brew packages
- run: |
- brew update --quiet
- brew install automake ninja
+ - uses: actions/checkout@v4
+ - name: Install dependencies
+ run: ./.github/scripts/install_deps.sh
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
run: printf 'NVIM_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV
- - name: Provision universal `libintl`
- run: |
- GETTEXT_PREFIX="$(brew --prefix gettext)"
- printf 'GETTEXT_PREFIX=%s\n' "$GETTEXT_PREFIX" >> $GITHUB_ENV
- bottle_tag="arm64_big_sur"
- brew fetch --bottle-tag="$bottle_tag" gettext
- cd "$(mktemp -d)"
- tar xf "$(brew --cache)"/**/*gettext*${bottle_tag}*.tar.gz
- lipo gettext/*/lib/libintl.a "${GETTEXT_PREFIX}/lib/libintl.a" -create -output libintl.a
- mv -f libintl.a /usr/local/lib/
- - name: Ensure static linkage to `libintl`
- run: |
- # We're about to mangle `gettext`, so let's remove any potentially broken
- # installs (e.g. curl, git) as those could interfere with our build.
- brew uninstall $(brew uses --installed --recursive gettext)
- brew unlink gettext
- ln -sf "$(brew --prefix)/opt/$(readlink "${GETTEXT_PREFIX}")/bin"/* /usr/local/bin/
- ln -sf "$(brew --prefix)/opt/$(readlink "${GETTEXT_PREFIX}")/include"/* /usr/local/include/
- rm -f "$GETTEXT_PREFIX"
- - name: Build release
- run: |
- export MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion | cut -f1 -d.)"
- OSX_FLAGS="-DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} -DCMAKE_OSX_ARCHITECTURES=arm64\;x86_64"
- make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} \
- CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH= $OSX_FLAGS" \
- DEPS_CMAKE_FLAGS="$OSX_FLAGS"
- make DESTDIR="$GITHUB_WORKSPACE/build/release/nvim-macos" install
- cd "$GITHUB_WORKSPACE/build/"
- # Make sure we build everything for M1 as well
- for macho in bin/* lib/nvim/parser/*.so
- do
- lipo -info "$macho" | grep -q arm64 || exit 1
- done
- cpack -C "$NVIM_BUILD_TYPE"
+ - name: Build universal binary
+ run: ./.github/scripts/build_universal_macos.sh
- uses: actions/upload-artifact@v3
with:
name: nvim-macos
@@ -143,24 +76,17 @@ jobs:
windows:
runs-on: windows-2019
- env:
- DEPS_BUILD_DIR: ${{ format('{0}/nvim-deps', github.workspace) }}
- DEPS_PREFIX: ${{ format('{0}/nvim-deps/usr', github.workspace) }}
- CMAKE_BUILD_TYPE: "RelWithDebInfo"
name: windows (MSVC_64)
steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- - name: Set env
- run: ./.github/workflows/env.ps1
+ - uses: actions/checkout@v4
+ - run: .github/scripts/env.ps1
- name: Build deps
run: |
- cmake -S cmake.deps -B $env:DEPS_BUILD_DIR -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo'
- cmake --build $env:DEPS_BUILD_DIR
+ cmake -S cmake.deps -B .deps -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo'
+ cmake --build .deps
- name: build package
run: |
- cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' -DDEPS_PREFIX="$env:DEPS_PREFIX"
+ cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo'
cmake --build build --target package
- uses: actions/upload-artifact@v3
with:
@@ -171,7 +97,7 @@ jobs:
retention-days: 1
publish:
- needs: [linux, appimage, macOS, windows]
+ needs: [linux, macOS, windows]
runs-on: ubuntu-latest
env:
GH_REPO: ${{ github.repository }}
@@ -181,7 +107,7 @@ jobs:
steps:
# Must perform checkout first, since it deletes the target directory
# before running, and would therefore delete the downloaded artifacts
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: actions/download-artifact@v3
@@ -215,8 +141,6 @@ jobs:
cd ./nvim-linux64
sha256sum nvim-linux64.tar.gz > nvim-linux64.tar.gz.sha256sum
echo "SHA_LINUX_64_TAR=$(cat nvim-linux64.tar.gz.sha256sum)" >> $GITHUB_ENV
- sha256sum nvim-linux64.deb > nvim-linux64.deb.sha256sum
- echo "SHA_LINUX_64_DEB=$(cat nvim-linux64.deb.sha256sum)" >> $GITHUB_ENV
- name: Generate App Image SHA256 checksums
run: |
cd ./appimage
@@ -256,22 +180,24 @@ jobs:
steps:
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
name: Publish stable
- uses: vedantmgoyal2009/winget-releaser@v1
+ uses: vedantmgoyal2009/winget-releaser@v2
with:
identifier: Neovim.Neovim
release-tag: ${{ github.event.inputs.tag_name || github.ref_name }}
token: ${{ secrets.WINGET_TOKEN }}
+ - name: Fetch nightly build msi from previous job
+ if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
+ uses: actions/download-artifact@v3
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
- name: Get nightly version
+ name: Get version from nightly build msi
id: get-version
run: |
- Invoke-WebRequest https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.msi -OutFile setup.msi
Install-Module -Name 'Carbon.Windows.Installer' -Force
- $VERSION = (Get-CMsi (Resolve-Path .\setup.msi).Path).ProductVersion
+ $VERSION = (Get-CMsi (Resolve-Path .\nvim-win64\nvim-win64.msi).Path).ProductVersion
"version=$VERSION" >> $env:GITHUB_OUTPUT
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
name: Publish nightly
- uses: vedantmgoyal2009/winget-releaser@v1
+ uses: vedantmgoyal2009/winget-releaser@v2
with:
identifier: Neovim.Neovim.Nightly
version: ${{ steps.get-version.outputs.version }}