From 0ce800753e18bea7e66827ee6e3d3500c83eddb0 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sun, 17 Oct 2021 22:55:46 -0400 Subject: ci(release): use gh cli instead of 3rd-party actions Closes #15709 [skip ci] --- .github/workflows/notes.md | 41 ++++++++++++++++++ .github/workflows/release.yml | 98 ++++++++++++------------------------------- 2 files changed, 68 insertions(+), 71 deletions(-) create mode 100644 .github/workflows/notes.md diff --git a/.github/workflows/notes.md b/.github/workflows/notes.md new file mode 100644 index 0000000000..20f998ff32 --- /dev/null +++ b/.github/workflows/notes.md @@ -0,0 +1,41 @@ +``` +${NVIM_VERSION} +``` + +## Install + +### Windows + +1. Extract **nvim-win64.zip** (or **nvim-win32.zip**) +2. Run `nvim-qt.exe` + +### macOS + +1. Download **nvim-macos.tar.gz** +2. Extract: `tar xzvf nvim-macos.tar.gz` +3. Run `./nvim-osx64/bin/nvim` + +### Linux (x64) + +1. Download **nvim.appimage** +2. Run `chmod u+x nvim.appimage && ./nvim.appimage` + - If your system does not have FUSE you can [extract the appimage](https://github.com/AppImage/AppImageKit/wiki/FUSE#type-2-appimage): + ``` + ./nvim.appimage --appimage-extract + ./squashfs-root/usr/bin/nvim + ``` + +### Other + +- Install by [package manager](https://github.com/neovim/neovim/wiki/Installing-Neovim) + +## SHA256 Checksums + +``` +${SHA_LINUX_64} +${SHA_APP_IMAGE} +${SHA_APP_IMAGE_ZSYNC} +${SHA_MACOS} +${SHA_WIN_64} +${SHA_WIN_32} +``` diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c6d3eaf42b..dea056312d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -145,10 +145,22 @@ jobs: publish: needs: [linux, appimage, macOS, windows] runs-on: ubuntu-20.04 + env: + GH_REPO: ${{ github.repository }} permissions: contents: write steps: + # Must perform checkout first, since it deletes the target directory + # before running, and would therefore delete the downloaded artifacts + - uses: actions/checkout@v2 + - uses: actions/download-artifact@v2 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y gettext-base + - if: github.event_name == 'workflow_dispatch' run: echo "TAG_NAME=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV - if: github.event_name == 'schedule' @@ -158,16 +170,17 @@ jobs: TAG_NAME=${{ github.ref }} echo "TAG_NAME=${TAG_NAME#refs/tags/}" >> $GITHUB_ENV - if: env.TAG_NAME == 'nightly' - run: echo 'SUBJECT=Nvim development (prerelease) build' >> $GITHUB_ENV + run: | + (echo 'SUBJECT=Nvim development (prerelease) build'; + echo 'PRERELEASE=--prerelease') >> $GITHUB_ENV - if: env.TAG_NAME != 'nightly' - run: echo 'SUBJECT=Nvim release build' >> $GITHUB_ENV + run: | + (echo 'SUBJECT=Nvim release build'; + echo 'PRERELEASE=') >> $GITHUB_ENV - if: env.TAG_NAME == 'nightly' - uses: dev-drprasad/delete-tag-and-release@v0.1.2 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - delete_release: true - tag_name: nightly + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release delete nightly --yes # `sha256sum` outputs , so we cd into each dir to drop the # containing folder from the output. - name: Generate Linux64 SHA256 checksums @@ -200,67 +213,10 @@ jobs: cd ./nvim-win64 sha256sum nvim-win64.zip > nvim-win64.zip.sha256sum echo "SHA_WIN_64=$(cat nvim-win64.zip.sha256sum)" >> $GITHUB_ENV - - uses: meeDamian/github-release@2.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ env.TAG_NAME }} - name: ${{ needs.linux.outputs.release }} - prerelease: ${{ env.TAG_NAME == 'nightly' }} - commitish: ${{ github.sha }} - gzip: false - allow_override: ${{ env.TAG_NAME == 'nightly' }} - files: | - nvim-macos.tar.gz:./nvim-macos/nvim-macos.tar.gz - nvim-macos.tar.gz.sha256sum:./nvim-macos/nvim-macos.tar.gz.sha256sum - nvim-linux64.tar.gz:./nvim-linux64/nvim-linux64.tar.gz - nvim-linux64.tar.gz.sha256sum:./nvim-linux64/nvim-linux64.tar.gz.sha256sum - nvim.appimage:./appimage/nvim.appimage - nvim.appimage.sha256sum:./appimage/nvim.appimage.sha256sum - nvim.appimage.zsync:./appimage/nvim.appimage.zsync - nvim.appimage.zsync.sha256sum:./appimage/nvim.appimage.zsync.sha256sum - nvim-win32.zip:./nvim-win32/nvim-win32.zip - nvim-win32.zip.sha256sum:./nvim-win32/nvim-win32.zip.sha256sum - nvim-win64.zip:./nvim-win64/nvim-win64.zip - nvim-win64.zip.sha256sum:./nvim-win64/nvim-win64.zip.sha256sum - body: | - ${{ env.SUBJECT }} - ``` - ${{ needs.linux.outputs.version }}``` - - ## Install - - ### Windows - - 1. Extract **nvim-win64.zip** (or **nvim-win32.zip**) - 2. Run `nvim-qt.exe` - - ### macOS - - 1. Download **nvim-macos.tar.gz** - 2. Extract: `tar xzvf nvim-macos.tar.gz` - 3. Run `./nvim-osx64/bin/nvim` - - ### Linux (x64) - - 1. Download **nvim.appimage** - 2. Run `chmod u+x nvim.appimage && ./nvim.appimage` - - If your system does not have FUSE you can [extract the appimage](https://github.com/AppImage/AppImageKit/wiki/FUSE#type-2-appimage): - ``` - ./nvim.appimage --appimage-extract - ./squashfs-root/usr/bin/nvim - ``` - - ### Other - - - Install by [package manager](https://github.com/neovim/neovim/wiki/Installing-Neovim) - - ## SHA256 Checksums - - ``` - ${{ env.SHA_LINUX_64 }} - ${{ env.SHA_APP_IMAGE }} - ${{ env.SHA_APP_IMAGE_ZSYNC }} - ${{ env.SHA_MACOS }} - ${{ env.SHA_WIN_64 }} - ${{ env.SHA_WIN_32 }} - ``` + - name: Publish release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NVIM_VERSION: ${{ needs.linux.outputs.version }} + run: | + envsubst < "$GITHUB_WORKSPACE/.github/workflows/notes.md" > "$RUNNER_TEMP/notes.md" + gh release create $TAG_NAME $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win32/* nvim-win64/* -- cgit From eede587b06ee286582445886c13c3bdc68cfa40d Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sun, 17 Oct 2021 23:39:00 -0400 Subject: ci(release): re-publish "stable" release for versioned releases [skip ci] --- .github/workflows/release.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dea056312d..7eca098d01 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -170,17 +170,19 @@ jobs: TAG_NAME=${{ github.ref }} echo "TAG_NAME=${TAG_NAME#refs/tags/}" >> $GITHUB_ENV - if: env.TAG_NAME == 'nightly' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | (echo 'SUBJECT=Nvim development (prerelease) build'; echo 'PRERELEASE=--prerelease') >> $GITHUB_ENV + gh release delete nightly --yes - if: env.TAG_NAME != 'nightly' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | (echo 'SUBJECT=Nvim release build'; echo 'PRERELEASE=') >> $GITHUB_ENV - - if: env.TAG_NAME == 'nightly' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh release delete nightly --yes + gh release delete stable --yes # `sha256sum` outputs , so we cd into each dir to drop the # containing folder from the output. - name: Generate Linux64 SHA256 checksums @@ -220,3 +222,6 @@ jobs: run: | envsubst < "$GITHUB_WORKSPACE/.github/workflows/notes.md" > "$RUNNER_TEMP/notes.md" gh release create $TAG_NAME $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win32/* nvim-win64/* + if [ "$TAG_NAME" != "nightly" ]; then + gh release create stable $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win32/* nvim-win64/* + fi -- cgit From c819ce1fd495b375ceaa85421f838b30f8b80017 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 18 Oct 2021 00:04:58 -0400 Subject: ci(release): do not fail if stable/nightly release doesn't exist [skip ci] --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7eca098d01..3c2291cc0c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -175,14 +175,14 @@ jobs: run: | (echo 'SUBJECT=Nvim development (prerelease) build'; echo 'PRERELEASE=--prerelease') >> $GITHUB_ENV - gh release delete nightly --yes + gh release delete nightly --yes || true - if: env.TAG_NAME != 'nightly' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | (echo 'SUBJECT=Nvim release build'; echo 'PRERELEASE=') >> $GITHUB_ENV - gh release delete stable --yes + gh release delete stable --yes || true # `sha256sum` outputs , so we cd into each dir to drop the # containing folder from the output. - name: Generate Linux64 SHA256 checksums -- cgit From c84b86fe3dce633b551dc395d2c07ff40e6fb42c Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sat, 30 Oct 2021 11:49:15 -0400 Subject: ci: make sure choco cpack does not interfere with CMake cpack [skip ci] --- ci/build.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/build.ps1 b/ci/build.ps1 index 8876ac31ef..a8b67c485b 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -170,6 +170,9 @@ if (-not $NoTests) { } } +# Ensure choco's cpack is not in PATH otherwise, it conflicts with CMake's +Remove-Item -Path $env:ChocolateyInstall\bin\cpack.exe -Force + # Build artifacts cpack -G ZIP -C RelWithDebInfo if ($env:APPVEYOR_REPO_TAG_NAME -ne $null) { -- cgit