mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-16 15:21:48 +03:00
Move release creation to prodtag
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
This commit is contained in:
parent
119dae29ca
commit
e3f58442aa
2 changed files with 12 additions and 27 deletions
13
.github/workflows/prodtag.yml
vendored
13
.github/workflows/prodtag.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: Auto-create tag on every push to `production`
|
||||
name: Auto-create tag/release on every push to `production`
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -8,9 +8,20 @@ on:
|
|||
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
|
||||
|
|
26
.github/workflows/tagrelease.yml
vendored
26
.github/workflows/tagrelease.yml
vendored
|
@ -1,26 +0,0 @@
|
|||
name: Create Release on every tag push in `production`
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: production
|
||||
- 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
|
Loading…
Add table
Reference in a new issue