Skip to content

CI/CD

CI/CD #4075

Workflow file for this run

name: CI/CD
on:
push: # Runs whenever a commit is pushed to the repository
workflow_call: # Allows another workflow to call this one
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
workflow_run: # Allows you to run this workflow when another workflow is run
types: [completed]
workflows:
- 'Daily TX Pull'
- 'Daily Help Update'
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
permissions:
contents: read # checkout
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write # publish a GitHub release
id-token: write # allows GHA to generate OIDC tokens
issues: write # comment on released issues
pages: write # deploy to GitHub Pages
pull-requests: write # comment on released pull requests
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
persist-credentials: false # automatic GITHUB_TOKEN would interfere with custom one in semantic-release step
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with:
cache: 'npm'
node-version-file: '.nvmrc'
- name: Info
# https://docs.github.com/en/actions/reference/security/secure-use#use-an-intermediate-environment-variable
env:
GH_HEAD_REF: ${{ github.head_ref }}
run: |
cat <<EOF
Node version: $(node --version)
NPM version: $(npm --version)
GitHub ref: ${{ github.ref }}
GitHub head ref: ${GH_HEAD_REF}
EOF
- name: Install dependencies
run: npm ci
- name: Audit npm signatures
run: npm audit signatures
- name: Setup & Test
run: |
mkdir -p ./test/results
npm test
- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx --no -- semantic-release