Skip to content

🙏 A GitHub Action that verify your package version whether meets some conditions.

License

Notifications You must be signed in to change notification settings

actions-cool/verify-package-version

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

🙏 Verify Package Version

Verify your package version whether meets some conditions.

Currently only PR triggering is supported, and more scenario requirements can be raised through issue.

Preview

How to use ?

name: Verify Package Version

on:
  pull_request:
    types: [opened, edited, reopened, synchronize, ready_for_review]

jobs:
  verify:
    runs-on: ubuntu-latest
    # Add conditions to trigger more effectively
    if: contains(github.event.pull_request.title, 'changelog')
    steps:
      - uses: actions/checkout@v2
      - name: verify-version
        uses: actions-cool/verify-package-version@v1
        with:
          title-include-content: 'docs'
          title-include-version: true
          open-comment: true
  • title-include-content: Verify that the title contains content
  • title-include-version: Verify that the title whether contains version, default true
  • open-comment:Whether to open comments, default false

Note

  • When set open-comment, the ref of PR must be in the current repositorie
  • When use 1.1.0+ and PR ref is base branch, it will use fs.readFileSync. This requires you add - uses: actions/checkout@v2

Changelog

CHANGELOG

LICENSE

MIT