Compare commits

...

19 Commits

Author SHA1 Message Date
Eric Fennis
248d1c31eb Adds release config 2025-01-03 15:50:42 +01:00
Eric Fennis
b6a978ec6a Use latest version of semantic version 2025-01-03 15:39:45 +01:00
Eric Fennis
de454e4d98 Add version 2025-01-03 15:38:15 +01:00
Eric Fennis
13c4163843 Add permissions 2025-01-03 15:37:53 +01:00
Eric Fennis
c0d4147fe6 fix: Test Version 2025-01-03 15:33:47 +01:00
Eric Fennis
0640cd0938 Test workflow 2025-01-03 15:27:19 +01:00
Eric Fennis
7ab9b83991 fix: release workflow 2025-01-03 15:22:20 +01:00
Eric Fennis
0c08347e5e Test workflpw 2025-01-03 15:01:08 +01:00
Eric Fennis
35e9cb4b6f Test workflow 2025-01-03 15:00:13 +01:00
Eric Fennis
2095ba6aa7 ci: Add commit message check 2024-10-10 05:47:54 +02:00
Eric Fennis
ddfc5cadc1 Merge branch 'main' of https://github.com/lucide-icons/lucide into new-release-workflow 2024-10-10 05:36:21 +02:00
Eric Fennis
f3c6929c98 Remove Node version 2024-10-10 05:36:17 +02:00
Eric Fennis
9b46e0dcba Add name in package.json 2024-10-10 05:34:06 +02:00
Eric Fennis
ef449fd5c5 Try mono repo setup 2024-10-10 05:29:12 +02:00
Eric Fennis
2892be8229 Add temporary branch test 2024-10-10 05:21:06 +02:00
Eric Fennis
2b1ad320fe Add PR title linting 2024-10-10 05:16:17 +02:00
Eric Fennis
61a86a959a enable dry run 2024-10-08 11:44:49 +02:00
Eric Fennis
d92e7796e4 test worflow 2024-10-08 11:43:44 +02:00
Eric Fennis
d237803413 Adds semantic release step in CI action 2024-07-22 11:37:06 +02:00
4 changed files with 77 additions and 53 deletions

View File

@@ -3,71 +3,67 @@ name: Continuous integration icons
on:
push:
branches:
- main
paths:
- icons/**/*.svg
# - main
- '*'
# paths:
# - icons/**/*.svg
jobs:
create-release:
if: github.repository == 'lucide-icons/lucide'
# Only create a new releases for new icons
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
packages: read
actions: write
issues: write
pull-requests: write
outputs:
VERSION: ${{ steps.new-version.outputs.NEW_VERSION }}
VERSION: ${{ steps.semantic.outputs.new_release_version }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v4
with:
node-version: 18
cache: 'pnpm'
tag_format: ${version}
branches: |
['new-release-workflow']
extends: |
semantic-release-monorepo
extra_plugins: |
@semantic-release/github
@semantic-release/git
@semantic-release/release-notes-generator
conventional-changelog-conventionalcommits
- name: Install dependencies
run: pnpm install --frozen-lockfile
- 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: 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)
echo $CHANGE_LOG
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "CHANGE_LOG<<$EOF" >> $GITHUB_OUTPUT
echo "$CHANGE_LOG" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
env:
GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check output
- name: Do something when a new release published
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo '${{ steps.new-version.outputs.NEW_VERSION }}'
echo '${{ steps.change-log.outputs.CHANGE_LOG }}'
echo ${{ steps.semantic.outputs.new_release_version }}
echo ${{ steps.semantic.outputs.new_release_major_version }}
echo ${{ steps.semantic.outputs.new_release_minor_version }}
echo ${{ steps.semantic.outputs.new_release_patch_version }}
# - name: Create Release
# uses: softprops/action-gh-release@v1
# with:
# tag_name: ${{ steps.semantic.outputs.new_release_version }}
# name: Version ${{ steps.semantic.outputs.new_release_version }}
# body: ${{ steps.semantic.outputs.new_release_notes }}
- 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 }}
start-release:
if: github.repository == 'lucide-icons/lucide'
needs: create-release
uses: './.github/workflows/release.yml'
secrets: inherit
with:
version: ${{ needs.create-release.outputs.VERSION }}
# start-release:
# if: github.repository == 'lucide-icons/lucide'
# needs: create-release
# uses: './.github/workflows/release.yml'
# secrets: inherit
# with:
# version: ${{ needs.create-release.outputs.VERSION }}

View File

@@ -21,3 +21,24 @@ jobs:
- name: Run Linter
run: pnpm lint
pr-title:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
fix
feat
perf
refactor
test
style
docs
ci
build
requireScope: true
ignoreLabels: |
bot

View File

@@ -1,4 +1,5 @@
{
"name": "@lucide/monorepo",
"private": true,
"scripts": {
"build": "pnpm -r --filter './packages/**' build",

6
release.config.mjs Normal file
View File

@@ -0,0 +1,6 @@
/**
* @type {import('semantic-release').GlobalConfig}
*/
export default {
branches: ['main', 'new-release-workflow'],
};