https://github.com/lvjiaxuan/github-action-templates
My frequently used GitHub action templates.
https://github.com/lvjiaxuan/github-action-templates
github-action publish release reuseable-workflow update-dependency
Last synced: 4 months ago
JSON representation
My frequently used GitHub action templates.
- Host: GitHub
- URL: https://github.com/lvjiaxuan/github-action-templates
- Owner: lvjiaxuan
- Created: 2023-09-04T09:28:07.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-06T10:19:19.000Z (4 months ago)
- Last Synced: 2025-03-06T11:28:03.915Z (4 months ago)
- Topics: github-action, publish, release, reuseable-workflow, update-dependency
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Workflow Templates
1. [lvr-release](.github/workflows/lvr-release.yml)
2. [lvr-publish](.github/workflows/lvr-publish.yml)(to npm)
3. [update-deps](.github/workflows/update-deps.yml)# Usage
## Release and Publish are usually used together.
Based on my own [release tool](github.com/lvjiaxuan/release).
features:
1. The release workflow extracts release's notes from `CHANGELOG.md` which is created by my tool.
2. The publish workflow supports syncing published pkgages to cnpm.```yml
name: Release and Publishon:
push:
tags:
- v*jobs:
release:
permissions:
contents: write
uses: lvjiaxuan/github-action-templates/.github/workflows/lvr-release.yml@main
secrets: inheritpublish:
uses: lvjiaxuan/github-action-templates/.github/workflows/lvr-publish.yml@main
with:
sync_cnpm: true
secrets: inherit
```## Update dependencies
### Ways to set the user's email, which is a required param.
1. A hard code on inputs. Recommend using GitHub's [noreply email](https://github.com/settings/emails).
2. If `inputs.email` isn't provided, the `vars.ACTOR_EMAIL` will be read. Refer to actions secrets and variables settings :point_right: https://github.com/{actor}/{repo}/settings/secrets/actions .> [!TIP]
> :point_right: [cron syntax help](https://crontab.guru/examples.html)```yml
name: Update Dependenciespermissions:
pull-requests: write
contents: writeon:
workflow_dispatch: {}
schedule:
- cron: 0 0 * * SATjobs:
update-deps:
uses: lvjiaxuan/github-action-templates/.github/workflows/update-deps.yml@main
with:
email: [email protected] # Explicitly set `inputs.email`, if `vars.ACTOR_EMAIL` isn't set on repo.
```[more inputs](https://github.com/lvjiaxuan/github-action-templates/blob/main/.github/workflows/update-deps.yml)
# Other recommended actions
1. [update-repository-description](https://github.com/zhengbangbo/update-repository-description) by @zhengbangbo