Skip to content

Commit 1c92a6f

Browse files
committed
Refactor release workflow to correctly prepare extension files and build outputs
1 parent bbf9e0d commit 1c92a6f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,32 +40,33 @@ jobs:
4040
- name: Prepare extension files
4141
run: |
4242
mkdir -p build
43+
mkdir -p extension-source
4344
# Copy all extension files except workflow files, git files, and README
44-
rsync -av --exclude='.git*' --exclude='*.md' --exclude='build' --exclude='*.pem' ./ build/
45+
rsync -av --exclude='.git*' --exclude='*.md' --exclude='build' --exclude='extension-source' --exclude='*.pem' ./ extension-source/
4546
4647
- name: Build CRX file
4748
run: |
48-
npx crx3 build/GoExport-Extension-${{ steps.get_version.outputs.VERSION }}.crx -p private-key.pem build/
49+
npx crx3 -p private-key.pem extension-source/ -o build/GoExport-Extension-${{ steps.get_version.outputs.VERSION }}.crx
4950
ls -lh build/
5051
5152
- name: Create ZIP archive (for manual installation)
5253
run: |
53-
cd build
54-
zip -r ../GoExport-Extension-${{ steps.get_version.outputs.VERSION }}.zip . -x "*.crx"
54+
cd extension-source
55+
zip -r ../build/GoExport-Extension-${{ steps.get_version.outputs.VERSION }}.zip .
5556
cd ..
5657
5758
- name: Generate SHA256 checksums
5859
run: |
5960
sha256sum build/GoExport-Extension-${{ steps.get_version.outputs.VERSION }}.crx > checksums.txt
60-
sha256sum GoExport-Extension-${{ steps.get_version.outputs.VERSION }}.zip >> checksums.txt
61+
sha256sum build/GoExport-Extension-${{ steps.get_version.outputs.VERSION }}.zip >> checksums.txt
6162
cat checksums.txt
6263
6364
- name: Upload CRX to release
6465
uses: softprops/action-gh-release@v1
6566
with:
6667
files: |
6768
build/GoExport-Extension-${{ steps.get_version.outputs.VERSION }}.crx
68-
GoExport-Extension-${{ steps.get_version.outputs.VERSION }}.zip
69+
build/GoExport-Extension-${{ steps.get_version.outputs.VERSION }}.zip
6970
checksums.txt
7071
tag_name: ${{ steps.get_version.outputs.VERSION }}
7172
body: |

0 commit comments

Comments
 (0)