Files
auto-changelog/.github/workflows/test.yml
T
Ardalan Amini bd78d66436 feat: Add semantic versioning compatibility (#47)
* feat: Use regex groups

* feat: Add semver input

* deps: Add semver v7.3.7

* deps(Dev): Add @types/semver v7.3.9

* feat: Add prerelease output

* chore: Update action directory

* feat: Log prerelease value

* ci(GitHub): Update release workflow

* docs: Update README.md

* feat: Add ability to detect previous version based on semver comparison

* ci(GitHub): fix test workflow
2022-04-29 00:06:26 +04:30

71 lines
1.5 KiB
YAML

name: Test
on: # rebuild any PRs and main branch changes
push:
branches:
- master
pull_request:
workflow_call:
jobs:
build: # make sure build/ci work properly
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ matrix.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm i --no-fund
- name: Check code styles
run: npm run lint
- name: Build using TypeScript
run: npm run build
- name: Package using ncc
run: npm run package
test: # make sure the action works on a clean machine without building
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Changelog
uses: ./
with:
semver: ${{ github.event_name == 'workflow_call' }}
test-with-inputes: # make sure the action works on a clean machine without building
name: Test with inputs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Changelog
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
commit-types: |
feat: Feature
default-commit-type: Default Type
semver: ${{ github.event_name == 'workflow_call' }}