From b54e4bcf84087b66295decf37c7d332627258320 Mon Sep 17 00:00:00 2001 From: Jay Patel <36803168+jay-babu@users.noreply.github.com> Date: Thu, 16 Feb 2023 00:55:25 -0500 Subject: [PATCH] chore: onboard to semver --- .github/workflows/ci.yml | 55 ++++++++++++++++++++++++++++++++++++ .github/workflows/stylua.yml | 22 --------------- .github/workflows/toc.yml | 11 -------- 3 files changed, 55 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/stylua.yml delete mode 100644 .github/workflows/toc.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2cb971c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,55 @@ +name: CI +on: + push: + branches: + - "main" + pull_request: + +jobs: + stylua: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run Stylua check + uses: JohnnyMorganz/stylua-action@v2 + with: + # token is needed because the action allegedly downloads binary from github releases + token: ${{ secrets.GITHUB_TOKEN }} + # CLI arguments + args: --check . + version: latest + generateTOC: + name: TOC Generator + runs-on: ubuntu-latest + steps: + - uses: technote-space/toc-generator@v4 + with: + CHECK_ONLY_DEFAULT_BRANCH: true + release: + name: release + + if: ${{ github.ref == 'refs/heads/main' }} + needs: + - stylua + - generateTOC + runs-on: ubuntu-latest + + steps: + - uses: google-github-actions/release-please-action@v3 + id: release + with: + release-type: simple + package-name: mason-null-ls.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 + + diff --git a/.github/workflows/stylua.yml b/.github/workflows/stylua.yml deleted file mode 100644 index 057d131..0000000 --- a/.github/workflows/stylua.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Stylua check - - -on: - push: - branches: - - "main" - pull_request: - -jobs: - stylua: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Run Stylua check - uses: JohnnyMorganz/stylua-action@v2 - with: - # token is needed because the action allegedly downloads binary from github releases - token: ${{ secrets.GITHUB_TOKEN }} - # CLI arguments - args: --check . - version: latest diff --git a/.github/workflows/toc.yml b/.github/workflows/toc.yml deleted file mode 100644 index afb856a..0000000 --- a/.github/workflows/toc.yml +++ /dev/null @@ -1,11 +0,0 @@ -on: push -name: TOC Generator - -jobs: - generateTOC: - name: TOC Generator - runs-on: ubuntu-latest - steps: - - uses: technote-space/toc-generator@v4 - with: - CHECK_ONLY_DEFAULT_BRANCH: true