Skip to content

Commit b8eba41

Browse files
committed
fix: 🔧 just publish don't create a release in GH we already did that
1 parent 35571c0 commit b8eba41

File tree

1 file changed

+3
-57
lines changed

1 file changed

+3
-57
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,18 @@
1-
name: Create release from version bump
1+
name: Publish to NPM on Release
22

33
on:
44
push:
55
tags:
66
- "v*"
77

88
permissions:
9-
contents: write
9+
contents: read
10+
packages: write
1011

1112
jobs:
12-
create-release:
13-
name: Create GitHub Release
14-
runs-on: ubuntu-latest
15-
16-
steps:
17-
- name: Checkout code
18-
uses: actions/checkout@v4
19-
with:
20-
fetch-depth: 2
21-
22-
- name: Extract version from tag
23-
id: version_extract
24-
run: |
25-
# Remove 'v' prefix from tag name to get version
26-
VERSION=${GITHUB_REF#refs/tags/v}
27-
echo "NEW_VERSION=$VERSION" >> $GITHUB_ENV
28-
echo "Extracted version: $VERSION"
29-
30-
- name: Create Release
31-
env:
32-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33-
run: |
34-
echo "Debug information:"
35-
echo "GITHUB_REF: $GITHUB_REF"
36-
echo "GITHUB_REF_NAME: ${{ github.ref_name }}"
37-
echo "GITHUB_REPOSITORY: ${{ github.repository }}"
38-
39-
# List all tags to see what exists
40-
echo "Available tags:"
41-
git tag -l
42-
43-
# Check if the specific tag exists
44-
if git rev-parse "${{ github.ref_name }}" >/dev/null 2>&1; then
45-
echo "Tag ${{ github.ref_name }} exists in git"
46-
else
47-
echo "Tag ${{ github.ref_name }} does NOT exist in git"
48-
fi
49-
50-
# Try to create release with more verbose output
51-
echo "Attempting to create release..."
52-
gh release create "${{ github.ref_name }}" \
53-
--repo="${{ github.repository }}" \
54-
--title="Release ${{ github.ref_name }}" \
55-
--generate-notes \
56-
--verbose || {
57-
echo "Release creation failed with exit code $?"
58-
echo "Trying to get more details about existing releases..."
59-
gh release list --repo="${{ github.repository }}" --limit=10
60-
exit 1
61-
}
62-
6313
publish-npm:
6414
name: Publish to NPM
65-
needs: create-release
6615
runs-on: ubuntu-latest
67-
permissions:
68-
contents: read
69-
packages: write
7016
steps:
7117
- uses: actions/checkout@v4
7218
- uses: actions/setup-node@v4

0 commit comments

Comments
 (0)