Skip to content

chore(release): v1.0.2 #17

chore(release): v1.0.2

chore(release): v1.0.2 #17

Workflow file for this run

name: ci
on:
workflow_dispatch:
pull_request:
branches: [main, master]
push:
branches: [main, master]
paths:
- '.electron-nuxt/**/*'
- 'builder.config.js'
- 'package.json'
- 'playwright.config.ts'
- 'src/main/**/*'
- 'src/renderer/nuxt.config.js'
- 'tests/**/*.test.ts'
- 'yarn.lock'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 16
check-latest: true
cache: 'yarn'
- name: Install dependencies
run: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 yarn install
- name: Run linter
run: yarn lint
# - name: Cancel workflow
# if: failure()
# uses: andymckay/[email protected]
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 16
check-latest: true
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Prepare Playwright
run: npx playwright install --with-deps chromium
- name: Set env variables
run: |
touch .env
echo SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} >> .env
echo SENTRY_ORG=${{ secrets.SENTRY_ORG }} >> .env
echo SENTRY_PROJECT=${{ secrets.SENTRY_PROJECT }} >> .env
echo SENTRY_DSN=${{ secrets.SENTRY_DSN }} >> .env
echo SENTRY_DISABLE=1 >> .env
echo ZOOM_SDK_KEY=${{ secrets.ZOOM_SDK_KEY }} >> .env
echo ZOOM_SIGNATURE_ENDPOINT=${{ secrets.ZOOM_SIGNATURE_ENDPOINT }} >> .env
- name: Prepare Build
run: |
yarn prebuild
yarn compile
- name: Build Electron app
env:
GH_TOKEN: ${{ secrets.github_token }}
run: yarn build-dev
#- name: Run tests
# run: yarn test
# - name: Upload screenshots to docs
# if: |
# matrix.os == 'ubuntu-latest' &&
# github.event_name == 'push' &&
# !startsWith(github.ref, 'refs/tags/v') &&
# startsWith(github.event.head_commit.message, 'chore(release)')
# uses: dmnemec/copy_file_to_another_repo_action@main
# env:
# API_TOKEN_GITHUB: ${{ secrets.PERSONAL_TOKEN }}
# with:
# source_file: 'img'
# destination_repo: 'advenimus/meeting-media-manager'
# destination_branch: 'docs'
# destination_folder: 'assets'
# user_email: '[email protected]'
# user_name: 'advenimus'
# commit_message: 'chore: update screenshots'
- uses: actions/upload-artifact@v3
if: failure()
with:
name: test-results ${{ matrix.os }}
path: test-results/
retention-days: 7
# - name: Cancel workflow
# if: failure()
# uses: andymckay/[email protected]
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 16
check-latest: true
cache: 'yarn'
- name: Install dependencies
if: matrix.os != 'windows-latest'
run: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 yarn install
- name: Install dependencies on Windows
if: matrix.os == 'windows-latest'
run: yarn install
- name: Set env variables
run: |
touch .env
echo SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} >> .env
echo SENTRY_ORG=${{ secrets.SENTRY_ORG }} >> .env
echo SENTRY_PROJECT=${{ secrets.SENTRY_PROJECT }} >> .env
echo SENTRY_DSN=${{ secrets.SENTRY_DSN }} >> .env
echo ZOOM_SDK_KEY=${{ secrets.ZOOM_SDK_KEY }} >> .env
echo ZOOM_SIGNATURE_ENDPOINT=${{ secrets.ZOOM_SIGNATURE_ENDPOINT }} >> .env
- name: Upload source maps to Sentry
if: |
github.event_name == 'push' &&
!startsWith(github.ref, 'refs/tags/v') &&
startsWith(github.event.head_commit.message, 'chore(release)')
run: echo SENTRY_SOURCE_MAPS=1 >> .env
- name: Prepare Build
run: |
yarn prebuild
yarn compile
- name: Build Electron app
if: |
github.event_name != 'push' ||
startsWith(github.ref, 'refs/tags/v') ||
!startsWith(github.event.head_commit.message, 'chore(release)')
env:
GH_TOKEN: ${{ secrets.github_token }}
run: yarn run build-dev
- name: Publish Electron app
if: |
github.event_name == 'push' &&
!startsWith(github.ref, 'refs/tags/v') &&
startsWith(github.event.head_commit.message, 'chore(release)')
env:
GH_TOKEN: ${{ secrets.github_token }}
run: yarn run build -p onTagOrDraft
- uses: actions/upload-artifact@v3
if: |
!startsWith(github.event.head_commit.message, 'chore(release)')
with:
name: release-files
path: |
build/
!build/icons/
!build/*-unpacked/
!build/mac-universal/
!build/*.blockmap
!build/*.yml
retention-days: 2
- name: Cancel workflow
if: failure()
uses: andymckay/[email protected]
release:
if: |
(github.event_name == 'push' &&
!startsWith(github.ref, 'refs/tags/v') &&
startsWith(github.event.head_commit.message, 'chore(release)')) || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
needs: [lint, test, build]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get version
id: version
uses: martinbeentjes/[email protected]
- name: Publish release
uses: ncipollo/release-action@v1
with:
name: ${{ format('v{0}', steps.version.outputs.current-version) }}
tag: ${{ format('v{0}', steps.version.outputs.current-version) }}
draft: false
allowUpdates: true
omitBodyDuringUpdate: true
skipIfReleaseExists: true
updateOnlyUnreleased: true
token: ${{ secrets.PERSONAL_TOKEN }}
- name: Delete older beta releases
uses: dev-drprasad/[email protected]
with:
keep_latest: 0
delete_tag_pattern: beta
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}