Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,24 @@ permissions:
jobs:
ci:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run lint
continue-on-error: true
- run: npm run build
- run: npm test
env:
TZ: 'America/New_York'

- name: Verify dist/ matches src/
run: |
if ! git diff --quiet --exit-code dist/; then
echo "::error::dist/ is out of date. Run 'npm run build' and commit the result."
git diff --stat dist/
exit 1
fi
7 changes: 4 additions & 3 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ permissions:
jobs:
dependency-review:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
with:
egress-policy: audit

- name: 'Checkout Repository'
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: 'Dependency Review'
uses: actions/dependency-review-action@da24556b548a50705dd671f47852072ea4c105d9 # v4.7.1
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
5 changes: 3 additions & 2 deletions .github/workflows/email.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ jobs:
run:
name: Copilot Usage
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: austenstone/copilot-usage@main
id: usage
with:
organization: ${{ vars.ORG }}
github-token: ${{ secrets.TOKEN }}
- uses: austenstone/job-summary@v2.0
- uses: austenstone/job-summary@67b7e1f68ee55e44d073ab7354e7b580cd09567c # v2.0
id: pdf
with:
name: copilot-usage
- uses: dawidd6/action-send-mail@v5
- uses: dawidd6/action-send-mail@94de994a9f6fffee200243214e17002e2920bb59 # v18
with:
server_address: smtp.gmail.com
server_port: 465
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release
on:
release:
types: [published]

permissions:
contents: write

jobs:
major-tag:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
TAG: ${{ github.event.release.tag_name }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0

- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: npm

- name: Verify dist/ matches src/
run: |
npm ci
npm run build
if ! git diff --quiet --exit-code dist/; then
echo "::error::dist/ is out of date for $TAG. Refusing to move the major tag."
exit 1
fi

- name: Move the major version tag
run: |
if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "::notice::$TAG is not a vX.Y.Z release tag, leaving major tags alone."
exit 0
fi
major="${TAG%%.*}"
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git tag -f "$major" "$TAG"
git push -f origin "refs/tags/$major"
echo "::notice::$major now points at $TAG"
14 changes: 7 additions & 7 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
# Uncomment the permissions below if installing in a private repository.
# contents: read
# actions: read
contents: read
actions: read

steps:
- name: "Checkout code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -59,7 +59,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: SARIF file
path: results.sarif
Expand All @@ -68,6 +68,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
uses: github/codeql-action/upload-sarif@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4
with:
sarif_file: results.sarif
81 changes: 0 additions & 81 deletions .github/workflows/scorecards.yml

This file was deleted.

5 changes: 3 additions & 2 deletions .github/workflows/usage-team.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ jobs:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Copilot Usage
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
# Add your teams here
team:
- corporate-solutions-eng
- bookstore-developers
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./
with:
# Add your organization here
Expand All @@ -30,7 +31,7 @@ jobs:
github-token: ${{ secrets.TOKEN }}
time-zone: "EST"
artifact-name: ${{ matrix.team }}-copilot-usage
- uses: austenstone/job-summary@main
- uses: austenstone/job-summary@3988550c1b6e3154d85ac5fdeee15ac877cae5a4 # main
with:
name: ${{ matrix.team }}-copilot-usage
artifact-name: ${{ matrix.team }}
3 changes: 2 additions & 1 deletion .github/workflows/usage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ jobs:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Copilot Usage
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./
id: copilot-usage
with:
Expand Down
Loading
Loading