git log --grep "\[ignore-rev\]" --pretty=format:"# %ad - %ae - %s%n%H… #985
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: Deno build | |
on: | |
push: | |
branches: [master] | |
tags: ['*'] | |
pull_request: | |
branches: [master] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Save describe stamp | |
id: describe | |
run: echo version=$( git describe ) >> $GITHUB_OUTPUT | |
- uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- run: ./build.ts | |
working-directory: ./bids-validator | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: main | |
path: bids-validator/dist/validator | |
test: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 5 | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, macos-12, windows-2022] | |
fail-fast: false | |
defaults: | |
run: | |
working-directory: ./bids-validator | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- run: deno test --allow-all --coverage=cov/ src/ | |
- name: Collect coverage | |
run: deno coverage cov/ --lcov --output=coverage.lcov | |
if: ${{ always() }} | |
- uses: codecov/codecov-action@v4 | |
if: ${{ always() }} | |
with: | |
files: coverage.lcov | |
deploy: | |
needs: [build] | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' && github.repository_owner == 'bids-standard' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PUSH_TOKEN }} | |
- name: Set credentials | |
run: | | |
git config --global user.name "BIDS-Bot" | |
git config --global user.email "bids-maintenance@users.noreply.github.com" | |
- name: Reset deno-build to orphan | |
run: | | |
git checkout --orphan deno-build | |
git reset --hard | |
- uses: actions/download-artifact@v4 | |
with: | |
name: main | |
path: main | |
- name: Commit to new branch | |
run: | | |
mv main/main.js main/bids-validator.js . | |
git add main.js bids-validator.js | |
git commit -m "BLD: $VERSION [skip ci]" || true | |
env: | |
VERSION: ${{ needs.build.describe.version }} | |
- name: Push | |
run: git push -f origin deno-build |