A GitHub action to write a "version" file to project root by fetching the latest tag and writing it to file.
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__'
Parameter | Description | Default |
---|---|---|
branch |
Which branch do we want to update file on? | master |
filename |
Name of file we are updating/creating | __version__ |
- add path input to export path to desired location
- add different test cases
- halik - for README template and alpine hacks