XS✔ ◾ Bump softprops/action-gh-release from 2.0.8 to 2.0.9 #2305
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
# Copyright (c) Microsoft Corporation. | |
# Licensed under the MIT License. | |
--- | |
name: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
merge_group: | |
types: | |
- checks_requested | |
schedule: | |
- cron: 0 0 * * 1 | |
workflow_dispatch: null | |
permissions: {} | |
jobs: | |
update-code: | |
name: Update Code | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: ${{ github.HEAD_REF }} | |
# Fine-grained Personal Access Token (PAT) with the following permissions for microsoft/PR-Metrics: | |
# - Read access to Metadata | |
# - Read and Write access to Code (aka Contents) | |
token: ${{ secrets.BUILD_UPDATE_CODE_CHECKOUT }} | |
- name: Install Node.js | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version: 20.16.0 | |
- name: npm – Install Dependencies | |
run: npm ci | |
- name: npm – Lint | |
run: npm run lint | |
- name: npm – Build Package | |
run: npm run build:package | |
- name: Git – Add Changed Files | |
run: git add -A | |
- name: Detect Changes | |
id: detect-changes | |
shell: pwsh | |
run: |- | |
$GitStatus = git status | |
Write-Output -InputObject $GitStatus | |
$NoChangesPresent = $GitStatus.Contains("nothing to commit, working tree clean") | |
Write-Output -InputObject $NoChangesPresent | |
Write-Output -InputObject "NO_CHANGES_PRESENT=$NoChangesPresent" >> $Env:GITHUB_OUTPUT | |
- if: ${{ steps.detect-changes.outputs.NO_CHANGES_PRESENT == 'False' }} | |
name: Git – Set Name | |
run: git config --global user.name "github-actions[bot]" | |
- if: ${{ steps.detect-changes.outputs.NO_CHANGES_PRESENT == 'False' }} | |
name: Git – Set Email | |
run: git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
- if: ${{ steps.detect-changes.outputs.NO_CHANGES_PRESENT == 'False' }} | |
name: Git – Commit Changed Files | |
run: git commit -m "Fixing linting, Updating dist folder" | |
- if: ${{ steps.detect-changes.outputs.NO_CHANGES_PRESENT == 'False' }} | |
name: Git – Push Changed Files | |
run: git push | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
permissions: {} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
disable-sudo: true | |
egress-policy: audit | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Install Node.js | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version: 20.16.0 | |
- name: npm – Install Dependencies | |
run: npm ci | |
- name: npm – Test Clean | |
run: npm run clean | |
- name: npm – Build | |
run: npm run build | |
- name: npm – Test | |
run: npm run test | |
- name: Release – Create | |
run: npx tfx-cli extension create --manifest-globs vss-extension.json --output-path ../ms-omex.PRMetrics.vsix | |
working-directory: ${{ github.workspace }}/release | |
- name: Release – Upload | |
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
with: | |
name: PRMetrics | |
path: ${{ github.workspace }}/ms-omex.PRMetrics.vsix | |
test-github-action: | |
name: Test GitHub Action | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
statuses: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
disable-sudo: true | |
egress-policy: audit | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: PR Metrics | |
uses: ./ | |
env: | |
PR_METRICS_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
file-matching-patterns: | | |
**/* | |
!dist/* | |
!package-lock.json | |
validate: | |
name: Validate | |
runs-on: ubuntu-latest | |
permissions: | |
security-events: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
disable-sudo: true | |
egress-policy: audit | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Validate Markdown Links | |
uses: gaurav-nelson/github-action-markdown-link-check@d53a906aa6b22b8979d33bc86170567e619495ec # 1.0.15 | |
with: | |
config-file: .github/linters/markdown-link-check.json | |
- name: Initialize | |
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0 | |
with: | |
build-mode: none | |
config-file: .github/linters/codeql.yml | |
languages: javascript-typescript | |
queries: security-extended,security-and-quality | |
- name: Analyze | |
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0 | |
with: | |
category: TypeScript | |
validate-linter: | |
name: Validate – Linter | |
runs-on: ubuntu-latest | |
permissions: | |
statuses: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
disable-sudo: true | |
egress-policy: audit | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Super Linter | |
uses: github/super-linter@b807e99ddd37e444d189cfd2c2ca1274d8ae8ef1 # v7 | |
env: | |
EDITORCONFIG_FILE_NAME: ../../.editorconfig | |
FILTER_REGEX_EXCLUDE: .*dist/.* | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITLEAKS_CONFIG_FILE: gitleaks.toml | |
MARKDOWN_CONFIG_FILE: ../../.markdownlint.json | |
VALIDATE_JSON: false | |
VALIDATE_TYPESCRIPT_ES: false | |
VALIDATE_TYPESCRIPT_STANDARD: false | |
dependabot: | |
if: ${{ github.actor == 'dependabot[bot]' }} | |
name: Dependabot | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
disable-sudo: true | |
egress-policy: audit | |
- name: Enable Auto-Merge | |
run: gh pr merge --auto --delete-branch --squash "${{ github.event.pull_request.html_url }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |