chore(deps): update primary-deps-non-major #510
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 | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
skip_coveralls: | |
description: "Skip coveralls" | |
type: boolean | |
default: false | |
skip_gas: | |
description: "Skip push" | |
type: boolean | |
default: false | |
skip_release: | |
description: "Skip release" | |
type: boolean | |
default: false | |
skip_sonarcloud: | |
description: "Skip sonarcloud" | |
type: boolean | |
default: false | |
skip_tests: | |
description: "Skip tests" | |
type: boolean | |
default: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
new_gas_version: ${{ steps.push-gas.outputs.new_gas_version }} | |
new_release_published: ${{ steps.release.outputs.new_release_published }} | |
new_release_version: ${{ steps.release.outputs.new_release_version }} | |
pages_version: ${{ steps.release-status.outputs.new_release_published == 'true' && steps.release-status.outputs.new_release_version || 'main' }} | |
do_push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
environment: | |
name: main | |
env: | |
CLASP_ACCESS_TOKEN: ${{secrets.CLASP_ACCESS_TOKEN}} | |
CLASP_CLIENT_ID: ${{secrets.CLASP_CLIENT_ID}} | |
CLASP_CLIENT_SECRET: ${{secrets.CLASP_CLIENT_SECRET}} | |
CLASP_EXAMPLES_DEPLOYMENT_ID: ${{secrets.CLASP_EXAMPLES_DEPLOYMENT_ID}} | |
CLASP_EXAMPLES_SCRIPT_ID: ${{secrets.CLASP_EXAMPLES_SCRIPT_ID}} | |
CLASP_ID_TOKEN: ${{secrets.CLASP_ID_TOKEN}} | |
CLASP_LIB_DEPLOYMENT_ID: ${{secrets.CLASP_LIB_DEPLOYMENT_ID}} | |
CLASP_LIB_SCRIPT_ID: ${{secrets.CLASP_LIB_SCRIPT_ID}} | |
CLASP_REFRESH_TOKEN: ${{secrets.CLASP_REFRESH_TOKEN}} | |
GCLOUD_PROJECT_ID: ${{secrets.GCLOUD_PROJECT_ID}} | |
GCLOUD_PROJECT_NR: ${{secrets.GCLOUD_PROJECT_NR}} | |
steps: | |
- id: checkout | |
name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
with: | |
persist-credentials: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
fetch-depth: 0 | |
- id: nodejs | |
name: Use Node.js | |
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4 | |
with: | |
node-version: 22.x | |
cache: "npm" | |
- id: build | |
name: Build | |
run: npm run ci:build | |
- id: test | |
if: ${{ !github.event.inputs.skip_tests }} | |
name: Test | |
run: npm run ci:test | |
- id: docs | |
name: Build docs | |
run: npm run ci:docs | |
- id: release-status | |
if: ${{ !github.event.inputs.skip_release }} | |
name: Release Status | |
uses: cycjimmy/semantic-release-action@cb425203a562475bca039ba4dbf90c7f9ac790f4 # v4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
dry_run: true | |
- id: coveralls | |
if: ${{ !github.event.inputs.skip_coveralls }} | |
name: Coveralls | |
uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 # v2 | |
- id: sonarcloud | |
if: ${{ !github.event.inputs.skip_sonarcloud }} | |
name: SonarCloud Scan | |
uses: sonarsource/sonarcloud-github-action@e44258b109568baa0df60ed515909fc6c72cba92 # v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
SONAR_PROJECT_VERSION: ${{ steps.release-status.outputs.new_release_published == 'true' && steps.release-status.outputs.new_release_version || '' }} | |
- id: push-gas | |
if: ${{ !github.event.inputs.skip_gas }} | |
name: Push to GAS | |
run: | | |
npm run push | |
echo "new_gas_version=$(cat build/gas/lib-version.txt)" >> "${GITHUB_OUTPUT}" | |
- id: release | |
if: ${{ !github.event.inputs.skip_release }} | |
name: Release | |
uses: cycjimmy/semantic-release-action@cb425203a562475bca039ba4dbf90c7f9ac790f4 # v4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- id: deploy-lib | |
if: ${{ !github.event.inputs.skip_release && !github.event.inputs.skip_release && steps.release.outputs.new_release_published == 'true' }} | |
name: Deploy Lib | |
run: npm run deploy | |
env: | |
CLASP_DEPLOYMENT_NAME: ${{ steps.release.outputs.new_release_version }} | |
- id: update-release-notes | |
if: ${{ !github.event.inputs.skip_release && steps.release.outputs.new_release_published == 'true' }} | |
name: Update Release Notes | |
run: | | |
npm run release:update | |
env: | |
CLASP_DEPLOYMENT_NAME: ${{ steps.release.outputs.new_release_version }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |