docs: update readme #12
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: Release | ||
on: | ||
push: | ||
branches: [main] | ||
workflow_dispatch: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
version: | ||
name: Determine version | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tag: ${{ steps.changelog.outputs.tag }} | ||
version: ${{ steps.changelog.outputs.version }} | ||
skipped: ${{ steps.changelog.outputs.skipped }} | ||
steps: | ||
- name: Checkout GitHub Action | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Tag and Commit | ||
id: changelog | ||
uses: TriPSs/conventional-changelog-action@v5 | ||
with: | ||
preset: 'conventionalcommits' | ||
git-user-name: 'github-actions[bot]' | ||
git-user-email: '41898282+github-actions[bot]@users.noreply.github.com' | ||
skip-git-pull: true | ||
git-push: false | ||
skip-on-empty: ${{ github.event_name == 'push' }} | ||
build: | ||
name: Build project | ||
runs-on: ubuntu-latest | ||
if: ${{ needs.version.outputs.skipped == 'false' }} | ||
needs: version | ||
steps: | ||
- name: Checkout GitHub Action | ||
uses: actions/checkout@v4 | ||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
- name: Setup cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node_modules- | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Lint | ||
run: npm run lint | ||
- name: Test | ||
run: npm test | ||
- name: Build | ||
env: | ||
VITE_GITLAB_CLIENT_ID: pull-request | ||
VITE_GITLAB_AUTHORITY: pull-request | ||
run: npm run build | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
needs: [version, build] | ||
if: ${{ needs.version.outputs.skipped == 'false' }} | ||
steps: | ||
- name: Checkout GitHub Action | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Bump Version | ||
id: changelog | ||
uses: TriPSs/conventional-changelog-action@v5 | ||
with: | ||
preset: 'conventionalcommits' | ||
git-user-name: 'github-actions[bot]' | ||
git-user-email: '41898282+github-actions[bot]@users.noreply.github.com' | ||
skip-git-pull: true | ||
git-push: true | ||
skip-on-empty: true | ||
release-count: 0 |