From 72a283c5ffbe1c6905e48a2ca4bd7284768f4019 Mon Sep 17 00:00:00 2001 From: Luco Bellic Date: Wed, 20 Mar 2024 21:24:02 +0100 Subject: [PATCH] ci: update workflow with lint and release please --- .github/.release-please-manifest.json | 3 ++ .github/release-please-config.json | 10 +++++ .github/workflows/ci.yml | 54 +++++++++++++-------------- 3 files changed, 40 insertions(+), 27 deletions(-) create mode 100644 .github/.release-please-manifest.json create mode 100644 .github/release-please-config.json diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json new file mode 100644 index 0000000..18cac80 --- /dev/null +++ b/.github/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.3.4" +} diff --git a/.github/release-please-config.json b/.github/release-please-config.json new file mode 100644 index 0000000..79fb87b --- /dev/null +++ b/.github/release-please-config.json @@ -0,0 +1,10 @@ +{ + "packages": { + ".": { + "release-type": "simple", + "package-name": "edgy-group.nvim", + "bump-patch-for-minor-pre-major": true, + "bump-minor-pre-major": true + } + } +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc4a67f..ea1bdc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,27 +13,38 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: + lint: + runs-on: ubuntu-latest + name: lint + steps: + - uses: actions/checkout@v4 + - uses: JohnnyMorganz/stylua-action@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: latest + args: --check . -g '*.lua' -g '!deps/' + docs: runs-on: ubuntu-latest if: ${{ github.ref == 'refs/heads/main' }} # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Generator documentation - name: panvimdoc uses: kdheepak/panvimdoc@main with: vimdoc: edgy-group.nvim - version: "Neovim >= 0.8.0" + version: "Neovim >= 0.9.0" toc: true demojify: true treesitter: true ignorerawblocks: true dedupsubheadings: true docmappingprojectname: true + titledatepattern: "%Y" shiftheadinglevelby: -1 # Push documentation update @@ -45,27 +56,16 @@ jobs: commit_user_email: "github-actions[bot]@users.noreply.github.com" commit_author: "github-actions[bot] " - # TODO: configure release process - # release: - # name: release - # if: ${{ github.ref == 'refs/heads/main' }} - # needs: - # - docs - # runs-on: ubuntu-latest - # steps: - # - uses: google-github-actions/release-please-action@v3 - # id: release - # with: - # release-type: simple - # package-name: edgy-group.nvim - # - uses: actions/checkout@v3 - # - name: tag stable versions - # if: ${{ steps.release.outputs.release_created }} - # run: | - # git config user.name github-actions[bot] - # git config user.email github-actions[bot]@users.noreply.github.com - # git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git" - # git tag -d stable || true - # git push origin :stable || true - # git tag -a stable -m "Last Stable Release" - # git push origin stable + release: + name: release + if: ${{ github.ref == 'refs/heads/main' }} + needs: + - docs + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v4 + id: release + with: + token: ${{ secrets.GITHUB_TOKEN }} + config-file: .github/release-please-config.json + manifest-file: .github/.release-please-manifest.json