Skip to content

GitHub action for parsing project current and next version from tags

Notifications You must be signed in to change notification settings

coditory/version-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Coditory Version GitHub Action

GitHub action that parses version tag and outputs next version

Sample usage

name: Build

on:
  workflow_dispatch:
  pull_request:
  push:
    branches-ignore:
      - 'dependabot/**'
      - 'gh-pages'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Build
        run: ./build.sh

      - name: Version
        id: version
        if: |
          github.event_name == 'push'
          && github.ref_name == github.event.repository.default_branch
        uses: coditory/version-action@v1
        with:
          snapshot: true

      - name: Publish Snapshot
        if: steps.version.outcome == 'success'
        env:
          NEXT_VERSION: ${{ steps.version.outputs.next_version }}
        run: |
          echo "Simulating snapshot publish to maven central with version: $NEXT_VERSION"
          echo "### Published snapshot version $NEXT_VERSION 🚀" | tee -a $GITHUB_STEP_SUMMARY

References

See:

About

GitHub action for parsing project current and next version from tags

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Languages