-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for renamed icons & Lucide-prefixed, add auto-updater (#6)
- Loading branch information
1 parent
847851a
commit 55efd5a
Showing
10 changed files
with
350 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Auto Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
create-gh-release: | ||
name: Create GitHub Release | ||
runs-on: ubuntu-latest | ||
if: github.event.commits[0].committer.name == 'github-actions[bot]' && startsWith(github.event.head_commit.message, '[release]') | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get tag | ||
id: get_tag | ||
run: echo "tag=$(jq -r --arg prefix "v" '$prefix + .version' package.json)" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Get Lucide version | ||
id: get_lucide_version | ||
run: echo "lucide_version=$(jq -r '.devDependencies["lucide-svelte"] | ltrimstr("^")' package.json)" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Create release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: ${{ steps.get_tag.outputs.tag }} | ||
body: | | ||
- Add support for newly renamed components in Lucide v${{ steps.get_lucide_version.outputs.lucide_version }} | ||
token: ${{ secrets.WORKFLOW_PAT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import tests from "../out.json"; | ||
|
||
const failingMap = tests.testResults | ||
.map(testResult => | ||
testResult.assertionResults | ||
.map(({ status, title, failureMessages }) => { | ||
if (status === "passed" || !title.startsWith("Alias imports:") || !failureMessages.length) | ||
return; | ||
const assertionError = failureMessages[0]?.split("\n")[0]; | ||
if (!assertionError) return; | ||
const assert = /'(\S+)'.*?'(\S+)'/.exec(assertionError); | ||
if (!assert) return; | ||
const [_, wrongModule, correctModule] = assert; | ||
return { wrongModule, correctModule }; | ||
}) | ||
.filter(Boolean) | ||
.flat() | ||
) | ||
.flat(); | ||
|
||
console.log( | ||
"{\n" + | ||
failingMap | ||
.map(({ wrongModule, correctModule }) => `\t"${wrongModule}": "${correctModule}"`) | ||
.join(",\n") + | ||
"\n}" | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.