BDE-233 unauthenticated loading loop #109
Workflow file for this run
This file contains 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: CI Build | |
on: | |
pull_request: | |
push: | |
branches: | |
- 'master' | |
- 'develop' # gitflow mainly on hosted runner | |
- '*-maintenance' | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
build: | |
permissions: | |
contents: write # This is needed for release | |
actions: write # This is needed for upload-artifact | |
runs-on: | |
- ${{ github.repository_owner != github.actor && 'ubuntu-latest' || 'self-hosted' }} | |
steps: | |
- name: Checkout Commit | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Cache nvm | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nvm | |
key: ${{ runner.os }}-nvm-${{ hashFiles('.nvmrc') }} | |
- name: Setup Node (github hosted runner) | |
if: ${{ !contains(runner.labels, 'self-hosted') }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Setup Node.js with nvm (self-hosted runner) | |
if: ${{ contains(runner.labels, 'self-hosted') }} | |
run: | | |
# Load NVM | |
[ -s "$HOME/.nvm/nvm.sh" ] || curl -s -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash | |
source "$HOME/.nvm/nvm.sh" # This loads nvm | |
# Install nodejs | |
nvm install | |
nvm use | |
# Add Node.js and corepack to PATH for subsequent steps | |
echo "$NVM_DIR/versions/node/$(nvm current)/bin" >> $GITHUB_PATH | |
- name: Setup pnpm | |
run: | | |
# Enable corepack | |
corepack enable | |
# Install pnpm | |
corepack prepare pnpm@next-8 --activate | |
- name: Verify installations | |
run: | | |
node --version | |
pnpm --version | |
corepack --version | |
- name: Cache pnpm store | |
uses: actions/cache@v4 | |
with: | |
path: ~/.pnpm-store | |
key: | | |
${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm build:chrome | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: chrome | |
path: ./dist/chrome | |
- name: Zip artifact | |
if: startsWith(github.ref, 'refs/tags/v') | |
env: | |
VERSION: ${{ github.ref_name }} | |
run: | | |
cd ./dist/chrome | |
zip -r ../BrowserDeveloperExtension-Chrome-$VERSION.zip . | |
- name: Create Release and Upload Asset | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: ./dist/BrowserDeveloperExtension-Chrome-*.zip | |
draft: true | |
prerelease: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |