Stabilize Auto-Hide reopen assertion in toolbar settings e2e (#58) #50
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
| # .github/workflows/release.yml | |
| name: Release | |
| on: | |
| push: | |
| branches: [main] | |
| # Manual workflow dispatch for releases | |
| workflow_dispatch: | |
| inputs: | |
| action: | |
| description: "Action to perform" | |
| required: true | |
| default: "build" | |
| type: choice | |
| options: | |
| - build | |
| - release | |
| - submit | |
| dryRun: | |
| description: "Perform dry run (no actual submission)" | |
| default: false | |
| type: boolean | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| changeset_check: | |
| permissions: | |
| contents: write | |
| name: Version with Changeset | |
| runs-on: ubuntu-24.04-arm | |
| if: | | |
| github.event_name == 'push' || | |
| github.event_name == 'workflow_dispatch' | |
| outputs: | |
| hasChangesets: ${{ steps.changeset-check.outputs.hasChangesets }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: jdx/mise-action@v2 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| with: | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| shell: bash | |
| run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Configure Git | |
| run: | | |
| git config user.email "github-actions@users.noreply.github.com" | |
| git config user.name "GitHub Actions" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Check for changesets | |
| id: changeset-check | |
| run: | | |
| if [ -z "$(ls .changeset/*.md 2>/dev/null | grep -v README)" ]; then | |
| echo "hasChangesets=false" >> "$GITHUB_OUTPUT" | |
| echo "⚠️ No changesets found. Skipping version bump." | |
| else | |
| echo "hasChangesets=true" >> "$GITHUB_OUTPUT" | |
| echo "✅ Changesets found. Proceeding with version bump." | |
| fi | |
| - name: Version packages | |
| if: steps.changeset-check.outputs.hasChangesets == 'true' | |
| id: version | |
| run: | | |
| pnpm changeset version | |
| NEW_VERSION=$(node -p "require('./package.json').version") | |
| echo "newVersion=$NEW_VERSION" >> "$GITHUB_OUTPUT" | |
| echo "📦 New version: $NEW_VERSION" | |
| - name: Get current version (if no changesets) | |
| if: steps.changeset-check.outputs.hasChangesets == 'false' | |
| run: | | |
| CURRENT_VERSION=$(node -p "require('./package.json').version") | |
| echo "📦 Current version: $CURRENT_VERSION" | |
| - name: Commit and Push (with version bump) | |
| if: ${{ steps.changeset-check.outputs.hasChangesets == 'true' }} | |
| run: | | |
| git add . | |
| git commit -m "chore(release): v$NEW_VERSION" | |
| git push | |
| env: | |
| NEW_VERSION: ${{ steps.version.outputs.newVersion }} | |
| release: | |
| name: Create Release & Publish to stores | |
| runs-on: ubuntu-24.04-arm | |
| needs: [changeset_check] | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| ref: "main" | |
| - uses: jdx/mise-action@v2 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| with: | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| shell: bash | |
| run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.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: Build and Zip | |
| run: | | |
| pnpm run zip:all | |
| - name: Get Version | |
| id: version | |
| run: | | |
| pnpm changeset version | |
| NEW_VERSION=$(node -p "require('./package.json').version") | |
| echo "newVersion=$NEW_VERSION" >> "$GITHUB_OUTPUT" | |
| echo "📦 New version: $NEW_VERSION" | |
| - name: Create GitHub Release (with version bump) | |
| if: ${{ needs.changeset_check.outputs.hasChangesets == 'true' }} | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v${{ steps.version.outputs.newVersion }} | |
| name: amgiflol@${{ steps.version.outputs.newVersion }} | |
| body_path: CHANGELOG.md | |
| files: | | |
| dist/*.zip | |
| draft: false | |
| prerelease: false | |
| env: | |
| NEW_VERSION: ${{ steps.version.outputs.newVersion }} | |
| - name: Create GitHub Release (no version bump) | |
| if: ${{ needs.changeset_check.outputs.hasChangesets == 'false' }} | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v${{ steps.version.outputs.newVersion }} | |
| name: amgiflol@${{ steps.version.outputs.newVersion }} | |
| body_path: CHANGELOG.md | |
| files: | | |
| dist/*.zip | |
| draft: true | |
| prerelease: true | |
| - name: Publish to Firefox Add-On Store | |
| if: ${{ needs.changeset_check.outputs.hasChangesets == 'true' }} | |
| run: | | |
| pnpm wxt submit \ | |
| --firefox-zip dist/*-firefox.zip --firefox-sources-zip dist/*-sources.zip | |
| env: | |
| CHROME_CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }} | |
| CHROME_CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }} | |
| CHROME_EXTENSION_ID: ${{ vars.CHROME_EXTENSION_ID }} | |
| CHROME_PUBLISH_TARGET: ${{ vars.CHROME_PUBLISH_TARGET }} | |
| CHROME_REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }} | |
| FIREFOX_CHANNEL: ${{ vars.FIREFOX_CHANNEL }} | |
| FIREFOX_EXTENSION_ID: ${{ vars.FIREFOX_EXTENSION_ID }} | |
| FIREFOX_JWT_ISSUER: ${{ secrets.FIREFOX_JWT_ISSUER }} | |
| FIREFOX_JWT_SECRET: ${{ secrets.FIREFOX_JWT_SECRET }} |