ci: package Blink native libraries #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*.*" | |
| schedule: | |
| - cron: "0 0 1 * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: release-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| prepare: | |
| name: Prepare release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| outputs: | |
| should_release: ${{ steps.prepare.outputs.should_release }} | |
| version: ${{ steps.prepare.outputs.version }} | |
| release_ref: ${{ steps.prepare.outputs.release_ref }} | |
| nvim_version: ${{ steps.prepare.outputs.nvim_version }} | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| ref: master | |
| - name: Resolve release version | |
| id: prepare | |
| shell: bash | |
| run: bash scripts/ci-prepare-release.sh | |
| smoke: | |
| if: needs.prepare.outputs.should_release == 'true' | |
| name: Smoke (${{ matrix.os }}) | |
| needs: prepare | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ needs.prepare.outputs.release_ref }} | |
| - name: Cache Neovim | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ runner.tool_cache }}/nvime-nvim/${{ needs.prepare.outputs.nvim_version }} | |
| key: nvim-${{ runner.os }}-${{ runner.arch }}-${{ needs.prepare.outputs.nvim_version }} | |
| - name: Install Neovim stable | |
| shell: bash | |
| env: | |
| NVIME_NEOVIM_VERSION: ${{ needs.prepare.outputs.nvim_version }} | |
| NVIME_NEOVIM_ROOT: ${{ runner.tool_cache }}/nvime-nvim/${{ needs.prepare.outputs.nvim_version }} | |
| run: bash scripts/ci-install-nvim.sh | |
| - name: Cache vim.pack plugins | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ${{ runner.tool_cache }}/nvime-pack/data | |
| ${{ runner.tool_cache }}/nvime-pack/cache | |
| key: vim-pack-${{ runner.os }}-${{ runner.arch }}-${{ needs.prepare.outputs.nvim_version }}-${{ hashFiles('nvim-pack-lock.json') }} | |
| restore-keys: | | |
| vim-pack-${{ runner.os }}-${{ runner.arch }}-${{ needs.prepare.outputs.nvim_version }}- | |
| - name: Run smoke test | |
| shell: bash | |
| env: | |
| NVIME_XDG_DATA_HOME: ${{ runner.tool_cache }}/nvime-pack/data | |
| NVIME_XDG_CACHE_HOME: ${{ runner.tool_cache }}/nvime-pack/cache | |
| run: bash scripts/ci-smoke.sh | |
| package: | |
| if: needs.prepare.outputs.should_release == 'true' | |
| name: Package (${{ matrix.os }}) | |
| needs: | |
| - prepare | |
| - smoke | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ needs.prepare.outputs.release_ref }} | |
| - name: Cache Neovim | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ runner.tool_cache }}/nvime-nvim/${{ needs.prepare.outputs.nvim_version }} | |
| key: nvim-${{ runner.os }}-${{ runner.arch }}-${{ needs.prepare.outputs.nvim_version }} | |
| - name: Install Neovim stable | |
| shell: bash | |
| env: | |
| NVIME_NEOVIM_VERSION: ${{ needs.prepare.outputs.nvim_version }} | |
| NVIME_NEOVIM_ROOT: ${{ runner.tool_cache }}/nvime-nvim/${{ needs.prepare.outputs.nvim_version }} | |
| run: bash scripts/ci-install-nvim.sh | |
| - name: Cache vim.pack plugins | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ${{ runner.tool_cache }}/nvime-pack/data | |
| ${{ runner.tool_cache }}/nvime-pack/cache | |
| key: vim-pack-${{ runner.os }}-${{ runner.arch }}-${{ needs.prepare.outputs.nvim_version }}-${{ hashFiles('nvim-pack-lock.json') }} | |
| restore-keys: | | |
| vim-pack-${{ runner.os }}-${{ runner.arch }}-${{ needs.prepare.outputs.nvim_version }}- | |
| - name: Build bundled package | |
| id: package | |
| shell: bash | |
| env: | |
| NVIME_RELEASE_VERSION: ${{ needs.prepare.outputs.version }} | |
| NVIME_XDG_DATA_HOME: ${{ runner.tool_cache }}/nvime-pack/data | |
| NVIME_XDG_CACHE_HOME: ${{ runner.tool_cache }}/nvime-pack/cache | |
| run: bash scripts/ci-package.sh | |
| - name: Upload package artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: ${{ steps.package.outputs.artifact_name }} | |
| path: ${{ steps.package.outputs.package_path }} | |
| release: | |
| if: needs.prepare.outputs.should_release == 'true' | |
| name: Release | |
| needs: | |
| - prepare | |
| - package | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download packaged artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| path: release-assets | |
| pattern: nvime-* | |
| merge-multiple: true | |
| - name: Publish GitHub release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| name: ${{ needs.prepare.outputs.version }} | |
| tag_name: ${{ needs.prepare.outputs.version }} | |
| generate_release_notes: true | |
| fail_on_unmatched_files: true | |
| files: | | |
| release-assets/* |