Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

CI

CI #2667

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install
- run: npm run build
- run: npm run format-check
- run: npm run lint
- run: npm run package
test:
runs-on: ubuntu-latest
strategy:
matrix:
dep:
- name: nixpkgs
repo: nixpkgs
owner: NixOS
- name: pre-commit-hooks
repo: pre-commit-hooks.nix
owner: cachix
steps:
- uses: actions/checkout@v3
- name: test
uses: ./
id: test
with:
dependency: ${{ matrix.dep.name }}
- name: check owner
run: if [ "${{ steps.test.outputs.owner }}" != "${{ matrix.dep.owner }}" ]; then exit 1; fi
- name: check repo
run: if [ "${{ steps.test.outputs.repo }}" != "${{ matrix.dep.repo }}" ]; then exit 1; fi
release:
runs-on: ubuntu-latest
concurrency: release
needs:
- build
- test
steps:
- uses: tibdex/github-app-token@v1
id: generate_token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: cycjimmy/[email protected]
with:
extra_plugins: |
@semantic-release/commit-analyzer
@semantic-release/release-notes-generator
@semantic-release/changelog
@semantic-release/github
@semantic-release/git
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}