Merge pull request #13 from jimeh/tweak-ci

This commit is contained in:
2023-05-19 00:31:52 +01:00
committed by GitHub
3 changed files with 37 additions and 27 deletions

30
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
---
name: Release
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
- name: MAJOR and MAJOR.MINOR tags
if: ${{ steps.release.outputs.release_created }}
uses: jimeh/update-tags-action@v1
with:
tags: |
v${{ steps.release.outputs.major }}
v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}

View File

@@ -1,27 +0,0 @@
---
name: Release
on:
push:
branches:
- main
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: jimeh/release-please-manifest-action@main
id: release
- name: Create/update MAJOR tag
if: ${{ steps.release.outputs.release_created }}
uses: richardsimko/update-tag@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 }}

View File

@@ -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