mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-28 22:36:27 +01:00
92 lines
2.6 KiB
YAML
92 lines
2.6 KiB
YAML
name: Continuous integration icons
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- icons/**/*.svg
|
|
|
|
jobs:
|
|
create-release:
|
|
if: github.repository == 'lucide-icons/lucide'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
|
|
- uses: pnpm/action-setup@v2.0.1
|
|
name: Install pnpm
|
|
id: pnpm-install
|
|
with:
|
|
version: 7
|
|
run_install: false
|
|
|
|
- name: Get pnpm store directory
|
|
id: pnpm-cache
|
|
run: |
|
|
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
|
|
|
- uses: actions/cache@v3
|
|
name: Setup pnpm cache
|
|
with:
|
|
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-store-
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Fetch tags
|
|
run: git fetch --all --tags
|
|
|
|
- name: Get latest tag
|
|
id: latest-tag
|
|
run: echo "LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Check if we can patch
|
|
run: .github/workflows/version-up.sh --minor
|
|
|
|
- name: Create new version
|
|
id: new-version
|
|
run: echo "NEW_VERSION=$(.github/workflows/version-up.sh --minor)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Create change log
|
|
id: change-log
|
|
run: |
|
|
CHANGE_LOG=$(pnpm run generate:changelog --old-tag=${{ steps.latest-tag.outputs.LATEST_TAG }})
|
|
CHANGE_LOG=$(tail -n +5 <<< $CHANGE_LOG)
|
|
CHANGE_LOG="${CHANGE_LOG//'%'/'%25'}"
|
|
CHANGE_LOG="${CHANGE_LOG//$'\n'/'%0A'}"
|
|
CHANGE_LOG="${CHANGE_LOG//$'\r'/'%0D'}"
|
|
echo $CHANGE_LOG
|
|
echo "CHANGE_LOG=$CHANGE_LOG" >> $GITHUB_OUTPUT
|
|
env:
|
|
GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
- name: Check output
|
|
run: |
|
|
echo '${{ steps.new-version.outputs.NEW_VERSION }}'
|
|
echo '${{ steps.change-log.outputs.CHANGE_LOG }}'
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
tag_name: ${{ steps.new-version.outputs.NEW_VERSION }}
|
|
name: New icons ${{ steps.new-version.outputs.NEW_VERSION }}
|
|
body: ${{ steps.change-log.outputs.CHANGE_LOG }}
|
|
|
|
- name: Release packages
|
|
uses: './.github/workflows/release.yml'
|
|
with:
|
|
version: ${{ steps.new-version.outputs.NEW_VERSION }}
|