Generate README.md #616
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: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 */12 * * *" | |
workflow_run: | |
workflows: ["Build And Release"] | |
types: | |
- completed | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
check-latest: true | |
- name: Check Go version | |
run: go version | |
- name: Get Latest Tag | |
id: get-latest-tag | |
run: | | |
echo "TAG: $(git describe --abbrev=0 --tags)" | |
echo "tag=$(git describe --abbrev=0 --tags)" >> $GITHUB_OUTPUT | |
- name: Generate README | |
run: | | |
go build -o bin/jetbrains -gcflags="all=-N -l" -ldflags '-X "github.com/designinlife/jetbrains/common.Version=${{ steps.get-latest-tag.outputs.tag }}" -w -s -extldflags="static"' . | |
./bin/jetbrains ls --readme >README.md | |
cat README.md | |
- name: Commit README | |
uses: EndBug/add-and-commit@v9 | |
with: | |
fetch: false | |
message: 'Update README.md' | |
add: 'README.md' |