Skip to content

Commit 42fe6e1

Browse files
authored
Modify release workflow for GoReleaser and zip output
Updated release workflow to skip dirty state and change zip output path.
1 parent 7137aa4 commit 42fe6e1

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,45 +30,29 @@ jobs:
3030
with:
3131
node-version: "22"
3232

33-
- name: Clean install frontend dependencies
34-
run: |
35-
cd internal/webui/web
36-
rm -rf node_modules package-lock.json
37-
npm install
38-
39-
- name: Stage changes for GoReleaser
40-
run: |
41-
# GoReleaser requires clean git state, so we stage the modified package-lock.json
42-
git add internal/webui/web/package-lock.json || true
43-
git status
44-
4533
- name: Run GoReleaser
4634
uses: goreleaser/goreleaser-action@v6
4735
with:
4836
distribution: goreleaser
4937
version: "~> v2"
50-
args: release --clean
38+
args: release --clean --skip=dirty
5139
env:
5240
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5341

5442
- name: Create source zip archive
5543
run: |
5644
# Get version from tag (e.g., v0.1.0)
5745
VERSION=${GITHUB_REF_NAME}
58-
# Create a clean temp directory
59-
mkdir -p /tmp/ngent-source
60-
# Export source code using git archive
61-
git archive --format=zip --prefix=ngent-${VERSION}/ --output=/tmp/ngent-${VERSION}-source.zip HEAD
62-
echo "Created source zip: /tmp/ngent-${VERSION}-source.zip"
63-
# List contents for verification
64-
unzip -l /tmp/ngent-${VERSION}-source.zip | head -20
46+
# Create source zip using git archive
47+
git archive --format=zip --prefix=ngent-${VERSION}/ --output=ngent-${VERSION}-source.zip HEAD
48+
echo "Created source zip: ngent-${VERSION}-source.zip"
6549
6650
- name: Upload source zip to release
6751
env:
6852
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6953
run: |
7054
VERSION=${GITHUB_REF_NAME}
71-
SOURCE_ZIP="/tmp/ngent-${VERSION}-source.zip"
55+
SOURCE_ZIP="ngent-${VERSION}-source.zip"
7256
7357
# Upload the source zip to the release
7458
gh release upload "${VERSION}" "${SOURCE_ZIP}" --clobber

0 commit comments

Comments
 (0)