refactor(ci): cleanup release.yml #19132

This commit is contained in:
Vedant 2022-06-28 16:10:53 +05:30 committed by GitHub
parent 094086a713
commit 9ddb481d88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,12 +44,9 @@ jobs:
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: nvim-linux64 name: nvim-linux64
path: build/nvim-linux64.tar.gz path: |
retention-days: 1 build/nvim-linux64.tar.gz
- uses: actions/upload-artifact@v3 build/nvim-linux64.deb
with:
name: nvim-linux64
path: build/nvim-linux64.deb
retention-days: 1 retention-days: 1
appimage: appimage:
@ -69,12 +66,9 @@ jobs:
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: appimage name: appimage
path: build/bin/nvim.appimage path: |
retention-days: 1 build/bin/nvim.appimage
- uses: actions/upload-artifact@v3 build/bin/nvim.appimage.zsync
with:
name: appimage
path: build/bin/nvim.appimage.zsync
retention-days: 1 retention-days: 1
macOS: macOS:
@ -132,6 +126,7 @@ jobs:
env: env:
DEPS_BUILD_DIR: ${{ format('{0}/nvim-deps', github.workspace) }} DEPS_BUILD_DIR: ${{ format('{0}/nvim-deps', github.workspace) }}
DEPS_PREFIX: ${{ format('{0}/nvim-deps/usr', github.workspace) }} DEPS_PREFIX: ${{ format('{0}/nvim-deps/usr', github.workspace) }}
CONFIGURATION: ${{ matrix.config }}
strategy: strategy:
matrix: matrix:
include: include:
@ -143,17 +138,12 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- run: powershell ci\build.ps1 -NoTests - run: powershell ci\build.ps1 -NoTests
env:
CONFIGURATION: ${{ matrix.config }}
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: ${{ matrix.archive }} name: ${{ matrix.archive }}
path: build/${{ matrix.archive }}.zip path: |
retention-days: 1 build/${{ matrix.archive }}.msi
- uses: actions/upload-artifact@v3 build/${{ matrix.archive }}.zip
with:
name: ${{ matrix.archive }}
path: build/${{ matrix.archive }}.msi
retention-days: 1 retention-days: 1
publish: publish:
@ -161,6 +151,7 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
env: env:
GH_REPO: ${{ github.repository }} GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions: permissions:
contents: write contents: write
steps: steps:
@ -171,9 +162,7 @@ jobs:
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
- name: Install dependencies - name: Install dependencies
run: | run: sudo apt-get update && sudo apt-get install -y gettext-base
sudo apt-get update
sudo apt-get install -y gettext-base
- if: github.event_name == 'workflow_dispatch' - if: github.event_name == 'workflow_dispatch'
run: echo "TAG_NAME=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV run: echo "TAG_NAME=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
@ -184,16 +173,12 @@ jobs:
TAG_NAME=${{ github.ref }} TAG_NAME=${{ github.ref }}
echo "TAG_NAME=${TAG_NAME#refs/tags/}" >> $GITHUB_ENV echo "TAG_NAME=${TAG_NAME#refs/tags/}" >> $GITHUB_ENV
- if: env.TAG_NAME == 'nightly' - if: env.TAG_NAME == 'nightly'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
(echo 'SUBJECT=Nvim development (prerelease) build'; (echo 'SUBJECT=Nvim development (prerelease) build';
echo 'PRERELEASE=--prerelease') >> $GITHUB_ENV echo 'PRERELEASE=--prerelease') >> $GITHUB_ENV
gh release delete nightly --yes || true gh release delete nightly --yes || true
git push origin :nightly || true git push origin :nightly || true
- if: env.TAG_NAME != 'nightly' - if: env.TAG_NAME != 'nightly'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
(echo 'SUBJECT=Nvim release build'; (echo 'SUBJECT=Nvim release build';
echo 'PRERELEASE=') >> $GITHUB_ENV echo 'PRERELEASE=') >> $GITHUB_ENV
@ -232,7 +217,6 @@ jobs:
echo "SHA_WIN_64_MSI=$(cat nvim-win64.msi.sha256sum)" >> $GITHUB_ENV echo "SHA_WIN_64_MSI=$(cat nvim-win64.msi.sha256sum)" >> $GITHUB_ENV
- name: Publish release - name: Publish release
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NVIM_VERSION: ${{ needs.linux.outputs.version }} NVIM_VERSION: ${{ needs.linux.outputs.version }}
DEBUG: api DEBUG: api
run: | run: |