Skip to content

Remove unused import #249

Remove unused import

Remove unused import #249

Workflow file for this run

name: Release Modern Search Web Parts SPFx package
on:
workflow_dispatch:
inputs:
create_release:
default: true
description: 'Create GiHub release?'
push:
branches:
- main
- 'release/**'
- develop
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: search-parts
strategy:
matrix:
node-version: [16.x]
outputs:
majorMinorPatch: ${{ steps.setoutputs.outputs.majorMinorPatch }}
semver: ${{ steps.setoutputs.outputs.semver }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '5.x'
- name: Setup pnpm
uses: pnpm/action-setup@v2.2.2
with:
version: 7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.7
- name: Set outputs
id: setoutputs
run: |
echo "name=majorMinorPatch::$GITVERSION_MAJORMINORPATCH" >> $GITHUB_OUTPUT
echo "name=semver::$GITVERSION_SEMVER" >> $GITHUB_OUTPUT
- name: Build SPFx
run: |
pnpm install
gulp update-version --value $GITVERSION_MAJORMINORPATCH
gulp update-package-name --name pnp-modern-search-parts-$GITVERSION_SEMVER
gulp bundle --ship
gulp package-solution --ship
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: pnp-modern-search-parts-${{ steps.gitversion.outputs.semVer }}
path: ${{ github.workspace }}/**/*.sppkg
release:
runs-on: ubuntu-latest
environment: production
if: ${{ github.ref_name == 'main' || startsWith(github.ref_name, 'release') || github.event.inputs.create_release }}
needs: build
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: pnp-modern-search-parts-${{ needs.build.outputs.semver }}
- name: Create GitHub release
uses: ncipollo/release-action@v1
with:
name: PnP Modern Search - ${{ needs.build.outputs.semVer }}
artifacts: ${{ github.workspace }}/**/*.sppkg
bodyFile: ".github/workflows/release-template.md"
draft: true
generateReleaseNotes: true
allowUpdates: true
replacesArtifacts: true
prerelease: ${{ startsWith(github.ref_name, 'release') }}
tag: ${{ needs.build.outputs.majorMinorPatch }}
commit: ${{ github.ref_name }}
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Deploy documentation
run: |
pip install markdown-include
pip install mkdocs-material==7.2.4
mkdocs gh-deploy --force