mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-29 00:20:11 +01:00
Add Release workflow (#164)
* add workflows * adjust release workflow * adjust release workflow * remove changes * remove changes font yml
This commit is contained in:
10
.github/workflows/font.yml
vendored
10
.github/workflows/font.yml
vendored
@@ -13,13 +13,13 @@ jobs:
|
||||
|
||||
- name: Clone 'Lucide'
|
||||
uses: actions/checkout@v2
|
||||
|
||||
|
||||
- name: Update repos
|
||||
run: sudo apt-get update
|
||||
|
||||
- name: Install FontForge
|
||||
run: sudo apt-get install zlib1g-dev fontforge
|
||||
|
||||
|
||||
- name: Install NodeJS and Yarn
|
||||
run: sudo apt-get install nodejs yarn
|
||||
|
||||
@@ -45,14 +45,14 @@ jobs:
|
||||
|
||||
- name: Install Font Custom dependency
|
||||
run: sudo gem install fontcustom
|
||||
|
||||
|
||||
- name: Install "outline-stroke"
|
||||
run: sudo yarn add svg-outline-stroke svgson
|
||||
|
||||
|
||||
- name: "Outline SVG"
|
||||
run: mkdir converted_icons && node scripts/outline_svg.js
|
||||
|
||||
|
||||
|
||||
- name: Build 'Lucide'
|
||||
run: echo "Building Lucide font" && fontcustom compile ./converted_icons -h -n Lucide -o build -F
|
||||
|
||||
|
||||
69
.github/workflows/release.yml
vendored
Normal file
69
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
name: Release to NPM
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
if: github.repository == 'lucide-icons/lucide'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
steps:
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/\v}
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
clean: true
|
||||
|
||||
- name: Set Auth Token
|
||||
run: yarn config set 'npmRegistries["//registry.npmjs.org"].npmAuthToken' ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
# Build lucide
|
||||
- name: Install Dependencies Lucide
|
||||
run: yarn --pure-lockfile
|
||||
|
||||
- name: Build lucide package
|
||||
run: yarn build
|
||||
|
||||
# Build lucide-react
|
||||
- name: Install Dependencies lucide-react
|
||||
run: yarn --pure-lockfile
|
||||
working-directory: packages/lucide-react
|
||||
|
||||
- name: Build lucide-react
|
||||
run: yarn build
|
||||
working-directory: packages/lucide-react
|
||||
|
||||
# Publish lucide
|
||||
- name: Set package.json version lucide
|
||||
run: yarn version --new-version ${{ steps.get_version.outputs.VERSION }} --no-git-tag-version
|
||||
|
||||
- name: publish lucide
|
||||
run: yarn publish
|
||||
|
||||
# Publish lucide-react
|
||||
- name: Set package.json version lucide-react
|
||||
run: yarn version --new-version ${{ steps.get_version.outputs.VERSION }} --no-git-tag-version
|
||||
working-directory: packages/lucide-react
|
||||
|
||||
- name: publish lucide-react
|
||||
run: yarn publish
|
||||
working-directory: packages/lucide-react
|
||||
|
||||
- name: Commit package.json
|
||||
run: |
|
||||
git add package.json
|
||||
git add packages/lucide-react/package.json
|
||||
git -c user.name="Lucide Bot" -c user.email="lucide-bot@users.noreply.github.com" \
|
||||
commit -m ":package: Bump version to ${{ steps.get_version.outputs.VERSION }}" --no-verify --quiet
|
||||
git remote set-url --push origin https://lucide-bot:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git
|
||||
git push origin HEAD:master
|
||||
|
||||
Reference in New Issue
Block a user