Skip to content

generate-readme.md

generate-readme.md #33

Workflow file for this run

name: generate-readme.md
on:
release:
types: [published]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master
- name: Delete old readme.md
uses: JesseTG/[email protected]
with:
path: readme.md
- name: Copy template to readme.md
uses: canastro/copy-file-action@master
with:
source: "TEMPLATE.md"
target: "readme.md"
- name: Set readme.md permissions
run: sudo chmod 0777 readme.md
- name: Replace variables in readme.md
uses: richardrigutins/replace-in-files@v2
with:
files: 'readme.md'
search-text: '$VERSION'
replacement-text: ${{ github.ref_name }}
encoding: 'utf8'
- name: Push changes
uses: EndBug/add-and-commit@v9
with:
committer_name: GitHub Actions
committer_email: [email protected]
add: .
message: 'update files'
push: '--force'