Skip to content

Latest commit

 

History

History
67 lines (55 loc) · 1.48 KB

README.md

File metadata and controls

67 lines (55 loc) · 1.48 KB

Check Version Action for GitHub

Verifies that the version number (in a pull request) was bumped by comparing it to the prevous version from the base branch.

Usage

See action.yaml

Basic
name: api
on:
  pull_request:
    paths:
      - "api"
      - "!README.md"
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: kriasoft/check-version@v1
        with: { path: "api" }

Full

name: api
on:
  pull_request:
    paths:
      - "api"
      - "!README.md"
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - id: pkg
        uses: kriasoft/check-version@v1
        with:
          path: "api"
          format: "{name}_v{version}+build.{pr_number}.zip"

      - run: |
          echo "name: ${{ steps.pkg.outputs.name }}"
          echo "version: ${{ steps.pkg.outputs.version }}"
          echo "release: ${{ steps.pkg.outputs.release }}"
        #
        # Prints:
        #   name: api
        #   version: 0.1.3
        #   release: api_v0.1.3+build.549.zip

License

The scripts and documentation in this project are released under the MIT License.