There is a limitation of workflow: An action in a workflow run can’t trigger a new workflow run. https://github.com/orgs/community/discussions/27028#discussioncomment-3254360
28 lines
697 B
YAML
28 lines
697 B
YAML
name: Auto-create tag/release on every push to `production`
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- production
|
|
|
|
jobs:
|
|
tag:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: production
|
|
- run: git tag "`date +%Y.%m.%d`.`git rev-parse --short HEAD`" $(git rev-parse HEAD)
|
|
- run: git push --tags
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
- run: npm ci && npm run build
|
|
- run: cd dist && zip -r ../phanpy-dist.zip . && cd ..
|
|
- uses: softprops/action-gh-release@v1
|
|
with:
|
|
generate_release_notes: true
|
|
files: phanpy-dist.zip
|