ci: fetch gitmodules #18
This file contains hidden or 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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
jobs: | |
shellcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true # initialize and update submodules | |
- name: Run ShellCheck | |
uses: ludeeus/[email protected] | |
tests: | |
runs-on: ubuntu-latest | |
needs: shellcheck | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true # make sure test helpers are available | |
- uses: mig4/[email protected] | |
with: | |
bats-version: 1.2.1 | |
- name: Run Bats tests | |
run: bats test/namae-no-eda.bats | |
release: | |
runs-on: ubuntu-latest | |
needs: tests | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Setup git user | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: npm | |
- name: Install dependencies | |
run: npm install | |
- name: Run release-it | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: npx release-it --ci |