Skip to content

nickatnight/export-version-file-action

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

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Actions status Release Status

📩 export-version-file-action

A GitHub action to write a "version" file to project root by fetching the latest tag and writing it to file.

Usage

Export a new file which contains the lastest tag version...triggered by a new release

name: export version file

on:
  release:
    types: [released]

jobs:
  export-version-file-action:
    runs-on: ubuntu-latest
    steps:
      - name: export version file action
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # this is added for you by default
        uses: nickatnight/export-version-file-action@master
        with:
          branch: "main"            # optional...defaults to 'master'
          filename: "tag"           # optional...defaults to '__version__'

Supported Parameters

Parameter Description Default
branch Which branch do we want to update file on? master
filename Name of file we are updating/creating __version__

TODO

  • add path input to export path to desired location
  • add different test cases

Acknowledgements

  • halik - for README template and alpine hacks