This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # name: Release InfoFlow Extension | |
| # on: | |
| # push: | |
| # branches: [ main ] | |
| # pull_request: | |
| # branches: [ main ] | |
| # workflow_dispatch: | |
| # jobs: | |
| # build-and-release: | |
| # runs-on: ubuntu-latest | |
| # permissions: | |
| # contents: write | |
| # steps: | |
| # - name: Checkout code | |
| # uses: actions/checkout@v4 | |
| # with: | |
| # token: ${{ secrets.GITHUB_TOKEN }} | |
| # fetch-depth: 0 | |
| # - name: Setup Node.js | |
| # uses: actions/setup-node@v4 | |
| # with: | |
| # node-version: '20' | |
| # - name: Install pnpm | |
| # run: npm install -g [email protected] | |
| # - name: Install dependencies | |
| # run: | | |
| # cd apps/InfoFlow | |
| # pnpm install | |
| # - name: Type check | |
| # run: | | |
| # cd apps/InfoFlow | |
| # pnpm tsc | |
| # - name: Build Chrome extension | |
| # run: | | |
| # cd apps/InfoFlow | |
| # pnpm build | |
| # - name: Build Firefox extension | |
| # run: | | |
| # cd apps/InfoFlow | |
| # pnpm build:firefox | |
| # - name: Package extensions | |
| # run: | | |
| # cd apps/InfoFlow | |
| # # Build extensions | |
| # pnpm build | |
| # pnpm build:firefox | |
| # # Create ZIP files manually | |
| # cd .output/chrome-mv3 | |
| # zip -r ../../chrome.zip . | |
| # cd ../firefox-mv3 | |
| # zip -r ../../firefox.zip . | |
| # cd .. | |
| # ls -la chrome.zip firefox.zip | |
| # - name: Get version | |
| # id: get_version | |
| # run: | | |
| # cd apps/InfoFlow | |
| # echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
| # echo "tag_name=v$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
| # - name: Create Release | |
| # if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| # uses: softprops/action-gh-release@v2 | |
| # with: | |
| # tag_name: ${{ steps.get_version.outputs.tag_name }} | |
| # name: InfoFlow Extension ${{ steps.get_version.outputs.tag_name }} | |
| # body: | | |
| # ## InfoFlow Extension Release ${{ steps.get_version.outputs.tag_name }} | |
| # ### Changes | |
| # - Automated release from main branch | |
| # ### Installation | |
| # - **Chrome**: Download `chrome.zip` and unzip, then load extension in developer mode | |
| # - **Firefox**: Download `firefox.zip` and unzip, then load temporary extension | |
| # ### Files | |
| # - `chrome.zip` - Chrome extension | |
| # - `firefox.zip` - Firefox extension | |
| # files: | | |
| # apps/InfoFlow/chrome.zip | |
| # apps/InfoFlow/firefox.zip | |
| # draft: false | |
| # prerelease: false | |
| # build-only: | |
| # runs-on: ubuntu-latest | |
| # if: github.event_name == 'pull_request' | |
| # steps: | |
| # - name: Checkout code | |
| # uses: actions/checkout@v4 | |
| # - name: Setup Node.js | |
| # uses: actions/setup-node@v4 | |
| # with: | |
| # node-version: '20' | |
| # - name: Install pnpm | |
| # run: npm install -g [email protected] | |
| # - name: Install dependencies | |
| # run: | | |
| # cd apps/InfoFlow | |
| # pnpm install | |
| # - name: Type check | |
| # run: | | |
| # cd apps/InfoFlow | |
| # pnpm tsc | |
| # - name: Build Chrome extension | |
| # run: | | |
| # cd apps/InfoFlow | |
| # pnpm build | |
| # - name: Build Firefox extension | |
| # run: | | |
| # cd apps/InfoFlow | |
| # pnpm build:firefox | |
| # - name: Package extensions | |
| # run: | | |
| # cd apps/InfoFlow | |
| # pnpm zip | |
| # pnpm zip:firefox | |
| # - name: Upload artifacts | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: extension-builds | |
| # path: | | |
| # apps/InfoFlow/chrome.zip | |
| # apps/InfoFlow/firefox.zip |