Skip to content

Commit 096d0f2

Browse files
committed
Improve release process
1 parent e471af6 commit 096d0f2

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ jobs:
5555
- name: Build packages
5656
run: bun run build
5757

58+
- name: Copy README to packages (if not exist)
59+
run: |
60+
for package_dir in packages/*/; do
61+
if [ ! -f "${package_dir}README.md" ]; then
62+
cp README.md "${package_dir}README.md"
63+
fi
64+
done
65+
5866
- name: Publish nuxt-auto-api to npm
5967
run: bunx npm publish --workspace=@websideproject/nuxt-auto-api --provenance --access public
6068

@@ -64,8 +72,9 @@ jobs:
6472
- name: Commit version updates
6573
run: |
6674
VERSION=${{ steps.version.outputs.version }}
75+
TARGET=${{ github.event.release.target_commitish || github.ref_name }}
6776
git config user.name "github-actions[bot]"
6877
git config user.email "github-actions[bot]@users.noreply.github.com"
6978
git add packages/*/package.json
7079
git commit -m "chore: update versions to $VERSION [skip ci]" || echo "No changes to commit"
71-
git push origin HEAD:${{ github.event.release.target_commitish }} || echo "No changes to push"
80+
git push origin HEAD:$TARGET || echo "No changes to push"

0 commit comments

Comments
 (0)