Skip to content

update ci workflow to fetch with history to collect changes #34

update ci workflow to fetch with history to collect changes

update ci workflow to fetch with history to collect changes #34

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
permissions:
contents: write
jobs:
ci:
runs-on: ubuntu-22.04
steps:
- name: πŸ›Ž Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: πŸ›  Setup node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: πŸ“¦ Install
run: npm ci
- name: πŸ§‘β€πŸ« Check Format
run: npm run format
- name: πŸ•΅οΈ Lint
run: npm run lint
- name: πŸ‘·β€β™‚οΈ Build
run: npm run build
- name: πŸ“¦ Create Release Package
if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') }}
id: package
run: zip -r dist.zip dist
- name: πŸ“‹ Collect Changes
if: ${{ steps.package.outcome == 'success' }}
id: changes
uses: simbo/changes-between-tags-action@v1
- name: 🎁 Create GitHub Release
if: ${{ steps.package.outcome == 'success' }}
uses: ncipollo/release-action@v1
with:
name: Release ${{ steps.changes.outputs.tag }}
body: ${{ steps.changes.outputs.changes }}
artifacts: dist.zip
# - name: 🚚 Deploy to GitHub Pages
# if: ${{ steps.package.outcome == 'success' }}
# uses: JamesIves/github-pages-deploy-action@v4
# with:
# folder: dist
# commit-message: Release ${{ github.ref_name }} from main @ ${{ github.sha }}