Skip to content

ci: fix workflow syntax #3

ci: fix workflow syntax

ci: fix workflow syntax #3

Workflow file for this run

on:
workflow_call:
secrets:
GITHUB_TOKEN:

Check failure on line 4 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

secret name `GITHUB_TOKEN` within `workflow_call` can not be used since it would collide with system reserved name
required: true
NPM_TOKEN:
required: true
jobs:
staticAnalysis:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- name: Install
run: npm ci
- name: Test
run: |
npm run format-check
npm run lint-check
npm run tsc
integrationTests:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
- uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- name: Install
run: npm ci
- name: Tests
run: |
git config --global user.name "libdragon-cli"
git config --global user.email "cli@libdragon.dev"
npm run test
buildExecutables:
strategy:
matrix:
runs-on: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- name: Install
run: npm ci
- name: Get next version
id: next_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
shell: bash
run: npx semantic-release --dry-run --no-ci
- name: Build
run: npm run pack ${{ steps.next_release.outputs.version }}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: executable-${{ matrix.runs-on }}
path: build/libdragon*