From 42fbbf7a6f7c039fc73a62d98c3c4767ac000048 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Fri, 19 May 2023 00:22:38 +0100 Subject: [PATCH 1/3] ci(release): switch to jimeh/update-tags-actions to move major/minor tags --- .github/workflows/release.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6aeabf9..12276a8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,17 +11,10 @@ jobs: steps: - uses: jimeh/release-please-manifest-action@main id: release - - name: Create/update MAJOR tag + - name: MAJOR and MAJOR.MINOR tags if: ${{ steps.release.outputs.release_created }} - uses: richardsimko/update-tag@v1 + uses: jimeh/update-tags-action@v1 with: - tag_name: v${{ steps.release.outputs.major }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Create/update MAJOR.MINOR tag - if: ${{ steps.release.outputs.release_created }} - uses: richardsimko/update-tag@v1 - with: - tag_name: v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + tags: | + v${{ steps.release.outputs.major }} + v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} From 59ebc8ab5c74dacf5ed9e27742dcc20016a6bbaa Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Fri, 19 May 2023 00:23:18 +0100 Subject: [PATCH 2/3] ci(release): switch to stable v1 of self --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12276a8..d25eb65 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ jobs: release-please: runs-on: ubuntu-latest steps: - - uses: jimeh/release-please-manifest-action@main + - uses: jimeh/release-please-manifest-action@v1 id: release - name: MAJOR and MAJOR.MINOR tags if: ${{ steps.release.outputs.release_created }} From 5ce2d33d70934eb426589deb206781f188a1874d Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Fri, 19 May 2023 00:26:02 +0100 Subject: [PATCH 3/3] ci(docs): add job to verify generated docs in readme are up to date --- .github/workflows/{release.yml => ci.yml} | 18 ++++++++++++++---- Makefile | 7 +++++++ 2 files changed, 21 insertions(+), 4 deletions(-) rename .github/workflows/{release.yml => ci.yml} (58%) diff --git a/.github/workflows/release.yml b/.github/workflows/ci.yml similarity index 58% rename from .github/workflows/release.yml rename to .github/workflows/ci.yml index d25eb65..99945de 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/ci.yml @@ -1,13 +1,23 @@ --- name: Release -on: - push: - branches: - - main +on: push jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: make docs + - name: Verify no changes after docs build + run: | + git diff --exit-code + release-please: runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' steps: - uses: jimeh/release-please-manifest-action@v1 id: release diff --git a/Makefile b/Makefile index c3f277e..8bafe03 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,10 @@ +.PHONY: docs +docs: readme + +.PHONY: readme +readme: check-npx action-docs + npx --yes prettier --print-width 80 --prose-wrap always --write README.md + .PHONY: action-docs action-docs: check-npx npx --yes action-docs --update-readme