1- name : Release InfoFlow Extension
2-
3- on :
4- push :
5- branches : [ main ]
6- pull_request :
7- branches : [ main ]
8- workflow_dispatch :
9-
10- jobs :
11- build-and-release :
12- runs-on : ubuntu-latest
13- permissions :
14- contents : write
15-
16- steps :
17- - name : Checkout code
18- uses : actions/checkout@v4
19- with :
20- token : ${{ secrets.GITHUB_TOKEN }}
21- fetch-depth : 0
22-
23- - name : Setup Node.js
24- uses : actions/setup-node@v4
25- with :
26- node-version : ' 20'
27-
28- - name : Install pnpm
29- run :
npm install -g [email protected] 30-
31- - name : Install dependencies
32- run : |
33- cd apps/InfoFlow
34- pnpm install
35-
36- - name : Type check
37- run : |
38- cd apps/InfoFlow
39- pnpm tsc
40-
41- - name : Build Chrome extension
42- run : |
43- cd apps/InfoFlow
44- pnpm build
45-
46- - name : Build Firefox extension
47- run : |
48- cd apps/InfoFlow
49- pnpm build:firefox
50-
51- - name : Package extensions
52- run : |
53- cd apps/InfoFlow
54- # Build extensions
55- pnpm build
56- pnpm build:firefox
57-
58- # Create ZIP files manually
59- cd .output/chrome-mv3
60- zip -r ../../chrome.zip .
61-
62- cd ../firefox-mv3
63- zip -r ../../firefox.zip .
64-
65- cd ..
66- ls -la chrome.zip firefox.zip
67-
68- - name : Get version
69- id : get_version
70- run : |
71- cd apps/InfoFlow
72- echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
73- echo "tag_name=v$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
74-
75- - name : Create Release
76- if : github.ref == 'refs/heads/main' && github.event_name == 'push'
77- uses : softprops/action-gh-release@v2
78- with :
79- tag_name : ${{ steps.get_version.outputs.tag_name }}
80- name : InfoFlow Extension ${{ steps.get_version.outputs.tag_name }}
81- body : |
82- ## InfoFlow Extension Release ${{ steps.get_version.outputs.tag_name }}
83-
84- ### Changes
85- - Automated release from main branch
86-
87- ### Installation
88- - **Chrome**: Download `chrome.zip` and unzip, then load extension in developer mode
89- - **Firefox**: Download `firefox.zip` and unzip, then load temporary extension
90-
91- ### Files
92- - `chrome.zip` - Chrome extension
93- - `firefox.zip` - Firefox extension
94- files : |
95- apps/InfoFlow/chrome.zip
96- apps/InfoFlow/firefox.zip
97- draft : false
98- prerelease : false
99-
100- build-only :
101- runs-on : ubuntu-latest
102- if : github.event_name == 'pull_request'
103-
104- steps :
105- - name : Checkout code
106- uses : actions/checkout@v4
107-
108- - name : Setup Node.js
109- uses : actions/setup-node@v4
110- with :
111- node-version : ' 20'
112-
113- - name : Install pnpm
114- run :
npm install -g [email protected] 115-
116- - name : Install dependencies
117- run : |
118- cd apps/InfoFlow
119- pnpm install
120-
121- - name : Type check
122- run : |
123- cd apps/InfoFlow
124- pnpm tsc
125-
126- - name : Build Chrome extension
127- run : |
128- cd apps/InfoFlow
129- pnpm build
130-
131- - name : Build Firefox extension
132- run : |
133- cd apps/InfoFlow
134- pnpm build:firefox
135-
136- - name : Package extensions
137- run : |
138- cd apps/InfoFlow
139- # Build extensions
140- pnpm build
141- pnpm build:firefox
142-
143- # Create ZIP files manually
144- cd .output/chrome-mv3
145- zip -r ../../chrome.zip .
146-
147- cd ../firefox-mv3
148- zip -r ../../firefox.zip .
149-
150- cd ..
151- ls -la chrome.zip firefox.zip
152-
153- - name : Upload artifacts
154- uses : actions/upload-artifact@v4
155- with :
156- name : extension-builds
157- path : |
158- apps/InfoFlow/chrome.zip
159- apps/InfoFlow/firefox.zip
1+ # name: Release InfoFlow Extension
2+
3+ # on:
4+ # push:
5+ # branches: [ main ]
6+ # pull_request:
7+ # branches: [ main ]
8+ # workflow_dispatch:
9+
10+ # jobs:
11+ # build-and-release:
12+ # runs-on: ubuntu-latest
13+ # permissions:
14+ # contents: write
15+
16+ # steps:
17+ # - name: Checkout code
18+ # uses: actions/checkout@v4
19+ # with:
20+ # token: ${{ secrets.GITHUB_TOKEN }}
21+ # fetch-depth: 0
22+
23+ # - name: Setup Node.js
24+ # uses: actions/setup-node@v4
25+ # with:
26+ # node-version: '20'
27+
28+ # - name: Install pnpm
29+ # run: npm install -g [email protected] 30+
31+ # - name: Install dependencies
32+ # run: |
33+ # cd apps/InfoFlow
34+ # pnpm install
35+
36+ # - name: Type check
37+ # run: |
38+ # cd apps/InfoFlow
39+ # pnpm tsc
40+
41+ # - name: Build Chrome extension
42+ # run: |
43+ # cd apps/InfoFlow
44+ # pnpm build
45+
46+ # - name: Build Firefox extension
47+ # run: |
48+ # cd apps/InfoFlow
49+ # pnpm build:firefox
50+
51+ # - name: Package extensions
52+ # run: |
53+ # cd apps/InfoFlow
54+ # # Build extensions
55+ # pnpm build
56+ # pnpm build:firefox
57+
58+ # # Create ZIP files manually
59+ # cd .output/chrome-mv3
60+ # zip -r ../../chrome.zip .
61+
62+ # cd ../firefox-mv3
63+ # zip -r ../../firefox.zip .
64+
65+ # cd ..
66+ # ls -la chrome.zip firefox.zip
67+
68+ # - name: Get version
69+ # id: get_version
70+ # run: |
71+ # cd apps/InfoFlow
72+ # echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
73+ # echo "tag_name=v$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
74+
75+ # - name: Create Release
76+ # if: github.ref == 'refs/heads/main' && github.event_name == 'push'
77+ # uses: softprops/action-gh-release@v2
78+ # with:
79+ # tag_name: ${{ steps.get_version.outputs.tag_name }}
80+ # name: InfoFlow Extension ${{ steps.get_version.outputs.tag_name }}
81+ # body: |
82+ # ## InfoFlow Extension Release ${{ steps.get_version.outputs.tag_name }}
83+
84+ # ### Changes
85+ # - Automated release from main branch
86+
87+ # ### Installation
88+ # - **Chrome**: Download `chrome.zip` and unzip, then load extension in developer mode
89+ # - **Firefox**: Download `firefox.zip` and unzip, then load temporary extension
90+
91+ # ### Files
92+ # - `chrome.zip` - Chrome extension
93+ # - `firefox.zip` - Firefox extension
94+ # files: |
95+ # apps/InfoFlow/chrome.zip
96+ # apps/InfoFlow/firefox.zip
97+ # draft: false
98+ # prerelease: false
99+
100+ # build-only:
101+ # runs-on: ubuntu-latest
102+ # if: github.event_name == 'pull_request'
103+
104+ # steps:
105+ # - name: Checkout code
106+ # uses: actions/checkout@v4
107+
108+ # - name: Setup Node.js
109+ # uses: actions/setup-node@v4
110+ # with:
111+ # node-version: '20'
112+
113+ # - name: Install pnpm
114+ # run: npm install -g [email protected] 115+
116+ # - name: Install dependencies
117+ # run: |
118+ # cd apps/InfoFlow
119+ # pnpm install
120+
121+ # - name: Type check
122+ # run: |
123+ # cd apps/InfoFlow
124+ # pnpm tsc
125+
126+ # - name: Build Chrome extension
127+ # run: |
128+ # cd apps/InfoFlow
129+ # pnpm build
130+
131+ # - name: Build Firefox extension
132+ # run: |
133+ # cd apps/InfoFlow
134+ # pnpm build:firefox
135+
136+ # - name: Package extensions
137+ # run: |
138+ # cd apps/InfoFlow
139+ # pnpm zip
140+ # pnpm zip:firefox
141+
142+ # - name: Upload artifacts
143+ # uses: actions/upload-artifact@v4
144+ # with:
145+ # name: extension-builds
146+ # path: |
147+ # apps/InfoFlow/chrome.zip
148+ # apps/InfoFlow/firefox.zip
0 commit comments