kriasoft / check-version

Check Version Action for GitHub

Home Page:https://github.com/marketplace/actions/check-version

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Check Version Action for GitHub

https://github.com/marketplace/actions/check-version

License:MIT License


Languages

Language:JavaScript 100.0%