Skip to content

kriasoft/check-version

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.