Skip to content

ci: compile and deploy #3888

ci: compile and deploy

ci: compile and deploy #3888

Workflow file for this run

# This workflow is the entry point for all CI processes.
# It is from here that all other workflows are launched.
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '.github/**'
- '!.github/workflows/ci.yml'
- '!.github/workflows/tests.yml'
- '!.github/workflows/release.yml'
- '**.md'
- .editorconfig
- .gitignore
- '.idea/**'
- '.vscode/**'
pull_request:
paths-ignore:
- '!.github/workflows/ci.yml'
- '!.github/workflows/tests.yml'
- '!.github/workflows/release.yml'
- '**.md'
- .editorconfig
- .gitignore
- '.idea/**'
- '.vscode/**'
concurrency:
group: ${{github.workflow}}-${{ github.ref }}
cancel-in-progress: true
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
APP_FULL_VERSION: ${{ steps.APP_FULL_VERSION.outputs.APP_FULL_VERSION }}
steps:
- uses: actions/checkout@v4
- id: COMMIT_TIMESTAMP
run: echo "COMMIT_TIMESTAMP=$(git show -s --format=%ct ${{ github.sha }})" >> $GITHUB_OUTPUT
- id: APP_VERSION
run: echo "APP_VERSION=$(jq -r .version package.json)" >> $GITHUB_OUTPUT
- id: APP_FULL_VERSION
run: echo "APP_FULL_VERSION=${{ steps.APP_VERSION.outputs.APP_VERSION }}.${{ steps.COMMIT_TIMESTAMP.outputs.COMMIT_TIMESTAMP }}" >> $GITHUB_OUTPUT
- run: |
echo "- \`COMMIT_TIMESTAMP\`: ${{ steps.COMMIT_TIMESTAMP.outputs.COMMIT_TIMESTAMP }}" >> $GITHUB_STEP_SUMMARY
echo "- \`APP_VERSION\`: ${{ steps.APP_VERSION.outputs.APP_VERSION }}" >> $GITHUB_STEP_SUMMARY
echo "- \`APP_FULL_VERSION\`: ${{ steps.APP_FULL_VERSION.outputs.APP_FULL_VERSION }}" >> $GITHUB_STEP_SUMMARY
compile-and-test:
needs:
- prepare
uses: ./.github/workflows/compile-and-test.yml
with:
renderer-template: ${{ matrix.renderer-template }}
app-version: ${{ needs.prepare.outputs.APP_FULL_VERSION }}
strategy:
fail-fast: false
matrix:
renderer-template:
- vanilla
- vanilla-ts
deploy:
needs:
- compile-and-test
uses: ./.github/workflows/deploy.yml
with:
renderer-template: ${{ matrix.renderer-template }}
app-version: ${{ needs.prepare.outputs.APP_FULL_VERSION }}
strategy:
fail-fast: false
matrix:
renderer-template:
- vanilla
- vanilla-ts
#
# dependabot:
# permissions:
# contents: write
# pull-requests: write
# needs:
# - tests
# runs-on: ubuntu-latest
# if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'cawa-93/vite-electron-builder'
# steps:
# - name: Enable auto-merge for Dependabot PRs
# run: gh pr merge --auto --rebase "$PR_URL"
# env:
# PR_URL: ${{github.event.pull_request.html_url}}
# GH_TOKEN: ${{secrets.GITHUB_TOKEN}}