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
pull/266/head
Lim Chee Aun 2023-10-16 22:19:52 +08:00
rodzic 119dae29ca
commit e3f58442aa
2 zmienionych plików z 12 dodań i 27 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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