generate-readme.md #31
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |