mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-10 13:18:25 +00:00
Bumps the github-actions group with 4 updates in the / directory: [pnpm/action-setup](https://github.com/pnpm/action-setup), [actions/setup-node](https://github.com/actions/setup-node), [actions/upload-artifact](https://github.com/actions/upload-artifact) and [actions/download-artifact](https://github.com/actions/download-artifact). Updates `pnpm/action-setup` from 6.0.10 to 6.1.0 - [Release notes](https://github.com/pnpm/action-setup/releases) - [Commits](https://github.com/pnpm/action-setup/compare/v6.0.10...ea17c68df8912ef543352723c149a84f56e3d413) Updates `actions/setup-node` from 7.0.0 to 7.1.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/820762786026740c76f36085b0efc47a31fe5020...949feb2413d6458794dcd2491c4babbbce0c15c1) Updates `actions/upload-artifact` from 7.0.1 to 7.0.2 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/043fb46d1a93c77aae656e7c1c64a875d1fc6a0a...cf430e030ddbb5b0abf93d22962f4752f3646cd9) Updates `actions/download-artifact` from 8.0.1 to 8.0.2 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c...9000827ccba6bdab643e8b6fd33ac0654aef8333) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: 8.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: actions/setup-node dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: actions/upload-artifact dependency-version: 7.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: pnpm/action-setup dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
177 lines
5.7 KiB
YAML
177 lines
5.7 KiB
YAML
name: Continuous integration icons
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- icons/*.svg
|
|
|
|
schedule:
|
|
- cron: '0 6 * * *'
|
|
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: Version
|
|
required: true
|
|
tag:
|
|
required: true
|
|
description: NPM tag
|
|
default: 'latest'
|
|
type: choice
|
|
options:
|
|
- latest
|
|
- next
|
|
- beta
|
|
- alpha
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
release-gate:
|
|
concurrency:
|
|
group: ci-${{ github.event_name == 'schedule' && github.ref || 'release-gated' }}
|
|
cancel-in-progress: true
|
|
if: github.repository == 'lucide-icons/lucide' && github.event_name != 'workflow_dispatch'
|
|
environment: ${{ github.event_name == 'schedule' && 'Icon Release' || 'Icon Release Gated' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Approve release
|
|
run: echo 'Release approved'
|
|
|
|
prepare-release:
|
|
needs: release-gate
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read # Required to check if a new release is needed
|
|
outputs:
|
|
SHOULD_RELEASE: ${{ steps.changes.outputs.SHOULD_RELEASE }}
|
|
LATEST_TAG: ${{ steps.latest-tag.outputs.LATEST_TAG }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Get latest tag
|
|
id: latest-tag
|
|
run: echo "LATEST_TAG=$(git tag --sort=-v:refname | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Log latest tag
|
|
run: echo '${{ steps.latest-tag.outputs.LATEST_TAG }}'
|
|
|
|
- name: Check for releasable changes
|
|
id: changes
|
|
env:
|
|
LATEST_TAG: ${{ steps.latest-tag.outputs.LATEST_TAG }}
|
|
run: |
|
|
if [ -z "$LATEST_TAG" ]; then
|
|
echo "::error::No version tag found to release from."
|
|
exit 1
|
|
fi
|
|
|
|
echo "Latest version tag: $LATEST_TAG"
|
|
|
|
CHANGES=$(git diff --name-only "$LATEST_TAG" HEAD -- ':(glob)icons/*.svg')
|
|
|
|
if [ -z "$CHANGES" ]; then
|
|
echo "::notice::No icon SVGs changed since $LATEST_TAG. Skipping release."
|
|
echo "SHOULD_RELEASE=false" >> "$GITHUB_OUTPUT"
|
|
exit 0
|
|
fi
|
|
|
|
echo "$CHANGES"
|
|
echo "SHOULD_RELEASE=true" >> "$GITHUB_OUTPUT"
|
|
|
|
create-release:
|
|
if: github.repository == 'lucide-icons/lucide' && needs.prepare-release.outputs.SHOULD_RELEASE == 'true'
|
|
needs: prepare-release
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write # Required to create the release and tag
|
|
outputs:
|
|
VERSION: ${{ steps.new-version.outputs.NEW_VERSION }}
|
|
RELEASE_URL: ${{ steps.create-release.outputs.url }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
|
|
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
with:
|
|
cache: 'pnpm'
|
|
node-version-file: 'package.json'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Check if we can patch
|
|
run: pnpm semver "$LATEST_TAG" -i minor
|
|
env:
|
|
LATEST_TAG: ${{ needs.prepare-release.outputs.LATEST_TAG }}
|
|
|
|
- name: Create new version
|
|
id: new-version
|
|
run: echo "NEW_VERSION=$(pnpm semver "$LATEST_TAG" -i minor)" >> "$GITHUB_OUTPUT"
|
|
env:
|
|
LATEST_TAG: ${{ needs.prepare-release.outputs.LATEST_TAG }}
|
|
|
|
- name: Check output
|
|
run: echo '${{ steps.new-version.outputs.NEW_VERSION }}'
|
|
|
|
- name: Create Release
|
|
id: create-release
|
|
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
|
|
with:
|
|
tag_name: ${{ steps.new-version.outputs.NEW_VERSION }}
|
|
target_commitish: ${{ github.sha }}
|
|
name: Version ${{ steps.new-version.outputs.NEW_VERSION }}
|
|
generate_release_notes: true
|
|
|
|
start-release:
|
|
if: github.repository == 'lucide-icons/lucide'
|
|
needs: create-release
|
|
uses: './.github/workflows/release.yml'
|
|
secrets: inherit
|
|
permissions:
|
|
id-token: write # Required for OIDC (npm provenance)
|
|
contents: write # Required to upload release assets
|
|
with:
|
|
version: ${{ needs.create-release.outputs.VERSION }}
|
|
|
|
dispatch-release:
|
|
if: github.repository == 'lucide-icons/lucide' && github.event_name == 'workflow_dispatch'
|
|
uses: './.github/workflows/release.yml'
|
|
secrets: inherit
|
|
permissions:
|
|
id-token: write # Required for OIDC (npm provenance)
|
|
contents: write # Required to upload release assets
|
|
with:
|
|
version: ${{ inputs.version }}
|
|
tag: ${{ inputs.tag }}
|
|
|
|
post-release:
|
|
name: Trigger post-release automation
|
|
if: >-
|
|
!cancelled() &&
|
|
github.repository == 'lucide-icons/lucide' &&
|
|
(needs.start-release.result == 'success' || needs.dispatch-release.result == 'success')
|
|
needs: [create-release, start-release, dispatch-release]
|
|
runs-on: ubuntu-latest
|
|
permissions: {}
|
|
steps:
|
|
- name: Dispatch post_release event
|
|
env:
|
|
GH_TOKEN: ${{ secrets.POST_RELEASE_TOKEN }}
|
|
RELEASE_TAG: ${{ needs.create-release.outputs.VERSION || inputs.version }}
|
|
RELEASE_URL: ${{ needs.create-release.outputs.RELEASE_URL }}
|
|
run: |
|
|
if [ -z "$RELEASE_URL" ]; then
|
|
RELEASE_URL="https://github.com/lucide-icons/lucide/releases/tag/$RELEASE_TAG"
|
|
fi
|
|
|
|
gh api \
|
|
--method POST \
|
|
repos/lucide-icons/post-release/dispatches \
|
|
--field event_type=post_release \
|
|
--field "client_payload[release_tag]=$RELEASE_TAG" \
|
|
--field "client_payload[release_url]=$RELEASE_URL"
|