fix: file deletion, bulk delete dialog, release build #15
Workflow file for this run
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: Build Browser Extensions | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-extensions: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Copy icons | |
| run: pnpm --filter @dlman/extension run copy-icons | |
| - name: Build Chrome extension | |
| run: pnpm --filter @dlman/extension run build:chrome | |
| - name: Build Firefox extension | |
| run: pnpm --filter @dlman/extension run build:firefox | |
| - name: Get version | |
| id: version | |
| run: | | |
| if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | |
| echo "tag=$(date +v%Y%m%d)" >> $GITHUB_OUTPUT | |
| else | |
| echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create Chrome extension ZIP | |
| run: | | |
| cd apps/extension/dist/chrome-mv3 | |
| zip -r ../../dlman-extension-chrome-${{ steps.version.outputs.tag }}.zip . | |
| cd ../../../ | |
| - name: Create Firefox extension ZIP | |
| run: | | |
| cd apps/extension/dist/firefox-mv2 | |
| zip -r ../../dlman-extension-firefox-${{ steps.version.outputs.tag }}.zip . | |
| cd ../../../ | |
| - name: Upload to existing release | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: | | |
| apps/extension/dlman-extension-chrome-${{ steps.version.outputs.tag }}.zip | |
| apps/extension/dlman-extension-firefox-${{ steps.version.outputs.tag }}.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |