Skip to content

Commit 440eeef

Browse files
hyglgithubclaude
andcommitted
ci: add automated release workflow
Trigger on manifest.json change, auto-build and create release. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1774a67 commit 440eeef

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and Release Extension
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'manifest.json'
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Get version from manifest.json
21+
id: get_version
22+
run: echo "VERSION=$(jq -r '.version' manifest.json)" >> $GITHUB_OUTPUT
23+
24+
- name: Create ZIP package
25+
run: |
26+
mkdir -p package
27+
cp manifest.json background.js content.js package/
28+
cp -r css js libs icons package/
29+
cd package
30+
zip -r ../bivinote-v${{ steps.get_version.outputs.VERSION }}-chrome.zip *
31+
32+
- name: Create GitHub Release
33+
uses: softprops/action-gh-release@v1
34+
with:
35+
tag_name: v${{ steps.get_version.outputs.VERSION }}
36+
name: BiViNote v${{ steps.get_version.outputs.VERSION }}
37+
draft: false
38+
prerelease: false
39+
generate_release_notes: true
40+
files: bivinote-v${{ steps.get_version.outputs.VERSION }}-chrome.zip

0 commit comments

Comments
 (0)