Merge pull request #5 from jd-apprentice/chore/update_changelog #11
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: test, analyze and publish | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "develop", "master" ] | |
paths: | |
- 'src/**' | |
- '__tests__/**' | |
pull_request: | |
branches: [ "develop", "master" ] | |
paths: | |
- 'src/**' | |
- '__tests__/**' | |
permissions: | |
contents: write | |
jobs: | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: set environment variables | |
run: | | |
touch .env | |
echo "TURSO_URL=${{ secrets.TURSO_URL }}" >> .env | |
echo "TURSO_DB_TOKEN=${{ secrets.TURSO_DB_TOKEN }}" >> .env | |
- name: install dependencies and test | |
run: | | |
bun install | |
bun test | |
analyze: | |
name: Analyze (${{ matrix.language }}) | |
needs: [test] | |
runs-on: ubuntu-latest | |
permissions: | |
security-events: write | |
packages: read | |
actions: read | |
contents: read | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- language: javascript-typescript | |
build-mode: none | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
build-mode: ${{ matrix.build-mode }} | |
release: | |
uses: jd-apprentice/jd-workflows/.github/workflows/release.yml@main | |
needs: [test, analyze] | |
if: github.ref == 'refs/heads/master' | |
with: | |
name: test, analyze and publish | |
runs_on: ubuntu-latest | |
secrets: | |
gh_token: ${{ secrets.GITHUB_TOKEN }} |