CI Build #58
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 | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
build: | |
runs-on: | |
- ${{ github.repository_owner != github.actor && 'ubuntu-latest' || 'self-hosted' }} | |
steps: | |
- name: Checkout Commit | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install pnpm | |
run: | | |
corepack enable | |
corepack prepare pnpm@next-8 --activate | |
- 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 | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: chrome | |
path: ./dist/chrome | |
- name: Zip artifact | |
env: | |
VERSION: ${{ github.ref_name }} | |
run: | | |
cd ./dist/chrome | |
zip -r ../BrowserDeveloperExtension-Chrome-$VERSION.zip . | |
- name: Create Release and Upload Asset | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ./dist/BrowserDeveloperExtension-Chrome-*.zip | |
draft: true | |
prerelease: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |