Convert simple-icons manual backup from submodule to tracked files

This commit is contained in:
MayaChat
2025-11-24 14:51:23 -05:00
parent 30bbe7a0a4
commit f363db5e47
3467 changed files with 42987 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
contact_links:
- name: Website
about: Issues and improvements for the website
url: https://github.com/simple-icons/simple-icons-website-rs/issues/new?template=website.md

View File

@@ -0,0 +1,34 @@
name: Documentation
description: Report problems and suggest ideas for the documentation
labels: [docs]
body:
- type: markdown
attributes:
value: |
Before opening a new issue, make sure it isn't covered by an existing issue.
Please search for [issues with the `docs` label][docs-issues] (including
closed issues) before you continue.
[docs-issues]: https://github.com/simple-icons/simple-icons/labels/docs
- type: dropdown
attributes:
label: Kind of Issue
description: |
If your issue type is not here, select "other" and explain in the
"Description" field below.
options: [Improvement, Mistake, Other]
validations:
required: true
- type: textarea
attributes:
label: Description
description: |
Include as much detail as possible, for example:
- A (perma)link to the docs in question
- Suggestions for how to change the docs
placeholder: "Example: The documentation doesn't cover my use case of the NPM package..."
validations:
required: true

View File

@@ -0,0 +1,35 @@
name: Icon removal
description: Report an icon for removal
labels: [breaking change]
title: 'Removal: <brand-name>'
body:
- type: markdown
attributes:
value: |
Before opening a new issue, make sure it isn't covered by an existing issue.
Please search for [issues with the `breaking change` label][breaking-issues]
(including closed issues) before you continue. If you find one for the brand
you're reporting then leave a comment on it or add a reaction.
[breaking-issues]: https://github.com/simple-icons/simple-icons/labels/breaking%20change
- type: input
attributes:
label: Brand Name
placeholder: 'Example: Simple Icons'
validations:
required: true
- type: textarea
attributes:
label: Reason for Removal
description: |
- If the brand no longer exists, include a link supporting that claim.
- If the brand should be removed for another reason, explain why.
placeholder: >-
Example: [this blogpost](https://example.com) announced the brand has been discontinued...
validations:
required: true

View File

@@ -0,0 +1,95 @@
name: Icon request
description: Request a new icon for Simple Icons
labels: [new icon, permissions in review]
title: 'Request: <brand-name>'
body:
- type: markdown
attributes:
value: |
We won't add non-brand icons or anything related to illegal services. If in
doubt, open an issue and we'll have a look. For more details see the
[Contributing Guidelines].
Before opening a new issue, make sure it isn't covered by an existing issue.
Please search for [issues with the `new icon` label][new-icon-issues]
(including closed issues) before you continue. If you find one for the brand
you're requesting then leave a comment on it or add a reaction.
> [!TIP]
> In order to view website rankings on `traffic.cv`:
> Go to `https://traffic.cv/website`, enter the website address, and click on Analyze Traffic.
[contributing guidelines]: https://github.com/simple-icons/simple-icons/blob/develop/CONTRIBUTING.md
[new-icon-issues]: https://github.com/simple-icons/simple-icons/issues?q=is%3Aissue+label%3A%22new+icon%22
- type: input
attributes:
label: Brand Name
placeholder: 'Example: Simple Icons'
validations:
required: true
- type: input
attributes:
label: Website
description: |
For non-web brands you can add a relevant link. You can put "None" if you don't
think there's a website.
placeholder: 'Example: https://simpleicons.org'
validations:
required: true
- type: textarea
attributes:
label: Popularity Metric
description: |
Provide either a [Traffic.cv rank], which must be in the top 500,000 to qualify,
or failing that another metric from [our contributing guidelines] that we can
use to assess the popularity of the requested brand.
[Traffic.cv rank]: https://traffic.cv
[our contributing guidelines]: https://github.com/simple-icons/simple-icons/blob/develop/CONTRIBUTING.md#assessing-popularity
placeholder: 'Example: The Traffic.cv rank is 261,758. See https://traffic.cv/simpleicons.org'
validations:
required: true
- type: checkboxes
attributes:
label: Forbidden Brands
options:
- label: I have reviewed the list of [forbidden brands](https://github.com/simple-icons/simple-icons/blob/develop/CONTRIBUTING.md#forbidden-brands) and can confirm the brand I am requesting is not one of them, nor is it a subsidiary of one of them.
required: true
- type: input
attributes:
label: Terms of Service
description: |
A lot of websites specify whether or not we can use their brand assets in their Terms of Service.
Please ensure you include the link here where relevant.
validations:
required: true
- type: textarea
attributes:
label: Official Resources for Icon and Color
description: |
Media kits, brand guidelines, SVG files, etc. You can set
this to "None" if you are unable to find any resources.
placeholder: |
Example:
- SVG: https://github.com/simple-icons/simple-icons/blob/develop/icons/simpleicons.svg
- Color: `#111111`, from the website header
validations:
required: true
- type: textarea
attributes:
label: Additional Comments
description: |
Is there anything else we should know about the brand? Remember that not everyone knows the brand as well as you do. For example:
- Are there multiple options for the logo and/or color?
- Is the icon released under a license?
- If you think the brand might not be accepted, why do you think it should be considered?
placeholder: 'Example: There are two variants of this icon...'

View File

@@ -0,0 +1,53 @@
name: Icon update
description: Help us improve by reporting outdated icons
labels: [update icon/data, permissions in review]
title: 'Update: <brand-name>'
body:
- type: markdown
attributes:
value: |
Before opening a new issue, make sure it isn't covered by an existing issue.
Please search for [issues with the `update icon/data` label][update-icon-data-issues]
(including closed issues) before you continue. If you find one for the brand
you're reporting then leave a comment on it or add a reaction.
[update-icon-data-issues]: https://github.com/simple-icons/simple-icons/labels/update%20icon/data
- type: input
attributes:
label: Brand Name
placeholder: 'Example: Simple Icons'
validations:
required: true
- type: input
attributes:
label: Terms of Service
description: |
A lot of websites specify whether or not we can use their brand assets in their Terms of Service.
Please ensure you include the link here where relevant.
validations:
required: true
- type: textarea
attributes:
label: Official Resources for Icon and Color
description: |
Media kits, brand guidelines, SVG files, etc. You can set
this to "None" if you are unable to find any resources.
placeholder: |
Example:
svg: https://github.com/simple-icons/simple-icons/blob/develop/icons/simpleicons.svg
color: `#111111`, from the website header
validations:
required: true
- type: textarea
attributes:
label: Additional Comments
description: |
Is there anything else we should know about the brand? Remember that not everyone knows the brand as well as you do. For example:
- Are there multiple options for the logo and/or color?
- Is the icon released under a license?
placeholder: 'Example: There are two variants of this icon...'

View File

@@ -0,0 +1,63 @@
name: Packages
description: Report problems and suggest ideas for the NPM and Packagist packages
labels: [package]
body:
- type: markdown
attributes:
value: |
Before opening a new issue, make sure it isn't covered by an existing issue.
Please search for [issues with the `package` label][package-issues] (including
closed issues) before you continue.
[package-issues]: https://github.com/simple-icons/simple-icons/labels/package
- type: dropdown
attributes:
label: Kind of Issue
description: |
If your issue type is not here, select "other" and explain in the
"Description" field below.
options: [Bug, Feature, Performance, Other]
validations:
required: true
- type: dropdown
attributes:
label: This issue concerns the...
options: [NPM package, Packagist package]
multiple: true
validations:
required: true
- type: input
attributes:
label: Package Version
placeholder: 'Example: 5.11.0'
validations:
required: true
- type: textarea
attributes:
label: Other Software
description: |
The software that you are using the package with (Node.js & NPM, PHP & Packagist,
Browser(s), other) and their versions. You can put "None" if you are unsure.
placeholder: |
Example:
Node.js v16
Chrome 92.0.4515.159 (Official Build) (64-bit)
validations:
required: true
- type: textarea
attributes:
label: Description
description: |
Anything relevant, for example:
- For bugs: "Steps to reproduce" and "Expected behavior"
- For feature requests: An example of a use case
- For performance: An example where performance is poor
placeholder: 'Example: The NPM package does not work for my use case...'
validations:
required: true

View File

@@ -0,0 +1,39 @@
<!--
Before opening your pull request, have a quick look at our contribution guidelines:
https://github.com/simple-icons/simple-icons/blob/develop/CONTRIBUTING.md
Consider adding a preview image of your submission using:
https://simpleicons.org/preview
-->
**Issue:** closes #
**Popularity metric:**
<!--
Regardless of whether or not the linked issue (if there is one) has a metric, please include the metric here for PR reviewers to validate. See our contributing guidelines at https://github.com/simple-icons/simple-icons/blob/develop/CONTRIBUTING.md#assessing-popularity for more details on how we assess a brand's popularity.
-->
**Terms of Service link:**
<!--
As part of the checklist below, you acknowledge you have reviewed the terms of service of a brand, to ensure we are granted permission to include this brand. Please link here to the terms you have reviewed, to make maintainer review easier. Ideally link to a section and/or paragraph.
-->
### Checklist
- [ ] I have reviewed the [forbidden brands](https://github.com/simple-icons/simple-icons/blob/develop/CONTRIBUTING.md#forbidden-brands) list and confirm the brand I am submitting a PR for is not one of them, nor is it a subsidiary of one of those brands
- [ ] I have reviewed the brand's terms of service, and am confident we can add this icon
- [ ] I updated the JSON data in `data/simple-icons.json`
- [ ] I optimized the icon with SVGO or SVGOMG
- [ ] The SVG `viewbox` is `0 0 24 24`
### Description
<!--
Anything relevant, for example:
- Why did you pick the hex value?
- Did you manually vectorize the logo?
- Have you used multiple sources?
- etc.
-->

View File

@@ -0,0 +1,31 @@
# When working in a fork, some workflows should not be executed
# as they do not have the necessary permissions. This causes
# them to fail and only serve to generate noise for people
# watching the fork's activity.
name: Check if running in a fork
description: Check if a workflow is running in a forked repository and set an output accordingly.
inputs:
in-fork-message:
description: Message to display when the workflow is running in a fork.
required: true
outputs:
is-fork:
description: Indicates if the current repository is a fork.
value: ${{ steps.check-is-fork.outputs.is-fork }}
runs:
using: composite
steps:
- id: check-is-fork
shell: bash
env:
IN_FORK_MESSAGE: ${{ inputs.in-fork-message }}
run: |
if [ "${{ github.repository_owner }}" != "simple-icons" ]; then
echo "is-fork=true" >> $GITHUB_OUTPUT
echo "$IN_FORK_MESSAGE"
else
echo "is-fork=false" >> $GITHUB_OUTPUT
fi

View File

@@ -0,0 +1,25 @@
name: Get issue/pull request labels
description: Get the current labels of an issue or pull request
inputs:
issue_number:
description: Issue or pull request number to get labels from
required: true
github-token:
description: GitHub token used to authenticate with the GitHub API
required: true
outputs:
labels:
description: Labels of the issue or pull request
value: ${{ steps.get-labels.outputs.labels }}
runs:
using: composite
steps:
- id: get-labels
shell: sh
env:
GH_TOKEN: ${{ inputs.github-token }}
run: |
labels="$(gh api 'repos/simple-icons/simple-icons/issues/${{ inputs.issue_number }}' --jq '.labels.[].name' | tr '\n' ',')"
echo "labels=$labels" >> $GITHUB_OUTPUT

View File

@@ -0,0 +1,16 @@
name: Get version
description: Get the current version of the project
outputs:
version:
description: The version of the project
value: ${{ steps.get-version.outputs.version }}
runs:
using: composite
steps:
- id: get-version
shell: sh
run: |
version="$(grep version -m 1 -i package.json | cut -d '"' -f4)"
echo "version=$version" >> $GITHUB_OUTPUT

View File

@@ -0,0 +1,38 @@
new icon:
- any: [icons/*.svg]
status: added
update icon/data:
- any: [icons/*.svg]
status: modified
- all: [data/simple-icons.json]
status: modified
breaking change:
- any: [icons/*.svg]
status: removed
docs:
- any: ['*.md']
status: modified
meta:
- any:
[
'.github/*',
'scripts/*',
'tests/*',
'.husky/*',
'*.mjs',
'*.d.ts',
'*.json',
'*.toml',
'*',
]
status: modified
dependencies:
- all: ['package-lock.json']
status: modified
permissions in review:
- any: [icons/*.svg]
status: added
- any: [icons/*.svg]
status: modified
- all: [data/simple-icons.json]
status: modified

View File

@@ -0,0 +1,27 @@
{
repositories: ['simple-icons/simple-icons'],
extends: [
'config:recommended',
// Make sure we get a single PR combining all updates
'group:all',
],
// Disable Dependency Dashboard
dependencyDashboard: false,
// Use our labelling system
labels: ['dependencies'],
// We generally always want the major version
separateMajorMinor: false,
// We manually update digest dependencies (eg. hashes in GitHub Actions)
digest: {enabled: false},
// PR title and commit message when updating dependencies
commitMessage: 'Update dependencies',
// Simplify PR body when updating dependencies
prBodyTemplate: '{{{header}}}{{{table}}}{{{warnings}}}{{{notes}}}{{{changelogs}}}',
}

View File

@@ -0,0 +1,160 @@
name: Add Pull Request Labels and Assign to Project
on:
pull_request_target:
types: [opened, closed]
jobs:
add-labels:
permissions:
contents: read
pull-requests: write
issues: write
runs-on: ubuntu-latest
if: |
github.event.action == 'opened' &&
github.event.pull_request.base.ref != 'master'
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- uses: simple-icons/labeler@v1
with:
repo-token: ${{ steps.app-token.outputs.token }}
# TODO: The next job has been temporarily disabled until the maintainers
# team decide to use projects board again.
# assign-to-project:
# runs-on: ubuntu-latest
# name: Assign to Project
# if: |
# github.event.action == 'opened' &&
# github.event.pull_request.base.ref != 'master'
# needs: add-labels
# steps:
# - uses: actions/create-github-app-token@v1
# id: app-token
# with:
# app-id: ${{ vars.BOT_APP_ID }}
# private-key: ${{ secrets.BOT_PRIVATE_KEY }}
# - name: Checkout
# uses: actions/checkout@v5
# - id: get-labels
# uses: ./.github/actions/get-labels
# with:
# issue_number: ${{ github.event.pull_request.number }}
# github-token: ${{ secrets.GITHUB_TOKEN }}
# - id: get-si-members
# name: Get simple-icons members
# run: |
# members="$(curl -H 'Authorization: Bearer ${{ steps.app-token.outputs.token }}' --retry 5 -s https://api.github.com/orgs/simple-icons/members | jq .[].login | tr '\n' ',' | sed -e 's/"//g' -e 's/,$//')"
# echo "members=$members" >> $GITHUB_OUTPUT
# - id: get-linked-issues
# name: Get linked issue numbers
# uses: mondeja/pr-linked-issues-action@v2
# with:
# # Lazy linked issues. If one of the lines of the pull request body
# # matches one of the next contents, the matching issue number will
# # be added to `issues` output:
# add_links_by_content: |
# **Issue:** #{issue_number}
# **Issue**: #{issue_number}
# **Close:** #{issue_number}
# **Close**: #{issue_number}
# **Closes:** #{issue_number}
# **Closes**: #{issue_number}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - id: priority-1
# name: Assign `update icon/data` pull requests to "Priority 1"
# uses: srggrs/assign-one-project-github-action@1.3.1
# env:
# MY_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
# if: contains(steps.get-labels.outputs.labels, 'update icon/data')
# with:
# project: https://github.com/orgs/simple-icons/projects/2
# column_name: Priority 1
# - id: priority-2
# name: Assign `new icon` pull requests to "Priority 2"
# uses: srggrs/assign-one-project-github-action@1.3.1
# env:
# MY_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
# # the PR has the `new icon` label along with a linked issue and
# # the opener is not a member of simple-icons organization
# if: |
# contains(steps.get-labels.outputs.labels, 'new icon') &&
# join(steps.get-linked-issues.outputs.issues) != '' &&
# contains(steps.get-si-members.outputs.members, github.event.pull_request.user.login) == false
# with:
# project: https://github.com/orgs/simple-icons/projects/2
# column_name: Priority 2
# - id: priority-3
# name: Assign `new icon` pull requests by maintainers to "Priority 3"
# uses: srggrs/assign-one-project-github-action@1.3.1
# env:
# MY_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
# # the PR has the `new icon` label along with a linked issue and
# # the opener is a member of the simple-icons organisation
# if: |
# contains(steps.get-labels.outputs.labels, 'new icon') &&
# join(steps.get-linked-issues.outputs.issues) != '' &&
# contains(steps.get-si-members.outputs.members, github.event.pull_request.user.login) == true
# with:
# project: https://github.com/orgs/simple-icons/projects/2
# column_name: Priority 3
# - id: priority-4
# name: Assign `new icon` pull requests by maintainers without an issue to "Priority 4"
# uses: srggrs/assign-one-project-github-action@1.3.1
# env:
# MY_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
# # the PR has the `new icon` label but with no linked issue and
# # the opener is a member of the simple-icons organisation
# if: |
# contains(steps.get-labels.outputs.labels, 'new icon') &&
# join(steps.get-linked-issues.outputs.issues) == '' &&
# contains(steps.get-si-members.outputs.members, github.event.pull_request.user.login) == true
# with:
# project: https://github.com/orgs/simple-icons/projects/2
# column_name: Priority 4
# - name: Assign pull requests to "Unprioritised"
# uses: srggrs/assign-one-project-github-action@1.3.1
# env:
# MY_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
# if: |
# steps.priority-1.conclusion == 'skipped' &&
# steps.priority-2.conclusion == 'skipped' &&
# steps.priority-3.conclusion == 'skipped' &&
# steps.priority-4.conclusion == 'skipped'
# with:
# project: https://github.com/orgs/simple-icons/projects/2
# column_name: Unprioritised
# unassign-from-project:
# runs-on: ubuntu-latest
# name: Unassign from Project
# if: |
# github.event.action != 'opened' &&
# github.event.pull_request.merged == false &&
# github.event.pull_request.base.ref != 'master'
# steps:
# - uses: actions/create-github-app-token@v1
# id: app-token
# with:
# app-id: ${{ vars.BOT_APP_ID }}
# private-key: ${{ secrets.BOT_PRIVATE_KEY }}
# - name: Assign closed pull requests to "Completed or Abandoned"
# uses: srggrs/assign-one-project-github-action@1.3.1
# env:
# MY_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
# with:
# project: https://github.com/orgs/simple-icons/projects/2
# column_name: Completed or Abandoned

View File

@@ -0,0 +1,23 @@
name: Autocloser
on:
issues:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v5
- name: Autoclose Issues
run: node scripts/autoclose-issues/autoclose.app.js
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
ISSUE_NUMBER: ${{ github.event.issue.number }}

View File

@@ -0,0 +1,101 @@
name: Create Release Pull Request
on:
# THIS WORKFLOW SHOULD NEVER BE TRIGGERED ON A PUSH EVENT. IF TRIGGERED ON A
# PUSH EVENT IT MAY CREATE AN ENDLESS STREAM OF 'version bump' COMMITS.
workflow_dispatch:
schedule:
# "At 00:00 on Sunday" (https://crontab.guru/once-a-week)
- cron: '0 0 * * 0'
# This Workflow can be triggered manually through the GitHub UI or API. For the
# API use the following request:
# curl -X POST \
# -H "Authorization: Bearer <token>" \
# -d '{"ref":"develop"}' \
# https://api.github.com/repos/simple-icons/simple-icons/actions/workflows/create-release.yml/dispatches
# Replacing <token> by a personal access token with scope `public_repo`
jobs:
check-is-fork:
name: Check if running in a fork
runs-on: ubuntu-latest
permissions: {}
outputs:
is-fork: ${{ steps.check.outputs.is-fork }}
steps:
- uses: actions/checkout@v5
- uses: ./.github/actions/check-is-fork
id: check
with:
in-fork-message: 'Create Release Pull Request workflow only can run in the main repository, skipping.'
release-pr:
runs-on: ubuntu-latest
needs: check-is-fork
permissions:
contents: read
pull-requests: write
issues: write
if: |
github.event_name != 'push' &&
needs.check-is-fork.outputs.is-fork != 'true'
outputs:
did-create-pr: ${{ steps.release.outputs.did-create-pr }}
new-version: ${{ steps.release.outputs.new-version }}
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- uses: simple-icons/release-action@v3
id: release
with:
repo-token: ${{ steps.app-token.outputs.token }}
version-bump:
runs-on: ubuntu-latest
needs: release-pr
permissions:
contents: write
if: |
github.event_name != 'push' &&
needs.release-pr.outputs.did-create-pr == 'true'
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v5
with:
# Ensure the commit can be pushed regardless of branch protections (must belong to an admin of this repo)
token: ${{ steps.app-token.outputs.token }}
# Ensure we are checked out on the develop branch
ref: develop
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
cache-dependency-path: '**/package-lock.json'
- name: Bump version
run: |
npm version --no-commit-hooks --no-git-tag-version \
"${{ needs.release-pr.outputs.new-version }}"
- name: Install dependencies
run: npm ci --no-audit --no-fund
- name: Update major version in CDN URLs
run: node scripts/release/update-cdn-urls.js
- name: Update SVGs count milestone
run: node scripts/release/update-svgs-count.js
- name: Update slugs table
run: node scripts/release/update-slugs-table.js
- name: Update SDK Typescript definitions
run: node scripts/release/update-sdk-ts-defs.js
- name: Commit version bump
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: Bump version
commit_user_name: 'simple-icons[bot]'
commit_user_email: 'simple-icons[bot]@users.noreply.github.com'
commit_author: 'simple-icons[bot] <simple-icons[bot]@users.noreply.github.com>'

View File

@@ -0,0 +1,20 @@
name: Merge Release Pull Request
on:
pull_request_review:
types: [submitted]
jobs:
release:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'release')
permissions:
pull-requests: write
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- uses: simple-icons/release-action@v3
with:
repo-token: ${{ steps.app-token.outputs.token }}

View File

@@ -0,0 +1,149 @@
name: Publish Releases
on:
push:
branches:
- master
jobs:
sanity-check:
name: Pre-publish checks
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
cache-dependency-path: '**/package-lock.json'
- name: Install dependencies
run: npm ci --no-audit --no-fund
- name: Run linters
run: npm run lint
- name: Build NodeJS package
run: npm run build
- name: Run tests
run: npm run test
npm:
name: NPM Package
needs: sanity-check
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # for OIDC authentication
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
cache-dependency-path: '**/package-lock.json'
- id: get-version
uses: ./.github/actions/get-version
- name: Install dependencies
run: npm ci --no-audit --no-fund
- name: Reformat to regular markdown
run: node scripts/release/reformat-markdown.js "${{ steps.get-version.outputs.version }}"
- name: Update SDK Typescript definitions
run: node scripts/release/update-sdk-ts-defs.js
- name: Minify icons data file
run: node scripts/release/minify-icons-data.js
- name: Build NodeJS package
run: npm run build
- name: Deploy to NPM
run: npm publish
github:
name: GitHub release
needs: sanity-check
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v5
- name: Get commit message (for release title and body)
id: commit
uses: kceb/git-message-action@v3
- id: get-version
uses: ./.github/actions/get-version
- name: Reformat to regular markdown
run: node scripts/release/reformat-markdown.js "${{ steps.get-version.outputs.version }}"
- name: Configure GIT credentials
run: |
git config user.name "simple-icons[bot]"
git config user.email "simple-icons[bot]@users.noreply.github.com"
# Commit that will only be included in the tag
- name: Commit CDN theme image links removal
run: |
git add README.md
git commit -m 'Replace README CDN theme image links'
- name: Create and push git tag
run: |
set -e
tag="${{ steps.get-version.outputs.version }}"
git tag -a "${tag}" -m "$GIT_MESSAGE"
git push origin "${tag}"
env:
GIT_MESSAGE: ${{ steps.commit.outputs.git-message }}
- name: Create release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
with:
tag_name: ${{ steps.get-version.outputs.version }}
name: ${{ steps.commit.outputs.title }}
body: ${{ steps.commit.outputs.body }}
- name: Send release to Discord
run: node scripts/release/discord-release-message.js "${{ steps.get-version.outputs.version }}"
env:
DISCORD_RELEASES_ROLE_ID: ${{ secrets.DISCORD_RELEASES_ROLE_ID }}
DISCORD_RELEASES_WEBHOOK_URL: ${{ secrets.DISCORD_RELEASES_WEBHOOK_URL }}
continue-on-error: true
font:
name: Trigger simple-icons-font release
needs: npm
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
repositories: 'simple-icons-font'
- name: Trigger simple-icons-font release
run: |
curl -X POST \
-H "Authorization: Bearer ${{ steps.app-token.outputs.token }}" \
-d '{"ref":"develop"}' \
https://api.github.com/repos/simple-icons/simple-icons-font/actions/workflows/auto-release.yml/dispatches
website:
name: Trigger simpleicons.org website update
needs: npm
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
repositories: 'simple-icons-website-rs'
- name: Trigger simpleicons.org website update
run: |
curl -X POST \
-H "Authorization: Bearer ${{ steps.app-token.outputs.token }}" \
-d '{"ref":"master"}' \
https://api.github.com/repos/simple-icons/simple-icons-website-rs/actions/workflows/auto-release.yml/dispatches

View File

@@ -0,0 +1,79 @@
name: Remove Outdated Labels
on:
pull_request_target:
types:
- closed
issues:
types:
- closed
permissions:
issues: write
pull-requests: write
jobs:
remove-merged-pr-labels:
name: Remove merged pull request labels
if: github.event.pull_request.merged
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- uses: mondeja/remove-labels-gh-action@v2
with:
token: ${{ steps.app-token.outputs.token }}
labels: |
assessing
awaiting reply
duplicate
in discussion
invalid
out of scope
pending
permission in review
permission required
won't add
remove-closed-pr-labels:
name: Remove closed pull request labels
if: |
github.event_name == 'pull_request_target' &&
(!github.event.pull_request.merged)
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- uses: mondeja/remove-labels-gh-action@v2
with:
token: ${{ steps.app-token.outputs.token }}
labels: |
in discussion
pending
assessing
permission in review
remove-closed-issue-labels:
name: Remove closed issue labels
if: github.event.issue.state == 'closed'
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- uses: mondeja/remove-labels-gh-action@v2
with:
token: ${{ steps.app-token.outputs.token }}
labels: |
in discussion
pending
assessing
permission in review

View File

@@ -0,0 +1,50 @@
name: Renovate
on:
schedule:
- cron: '0 0 1 5,11 *'
workflow_dispatch:
jobs:
check-is-fork:
name: Check if running in a fork
runs-on: ubuntu-latest
permissions: {}
outputs:
is-fork: ${{ steps.check.outputs.is-fork }}
steps:
- uses: actions/checkout@v5
- uses: ./.github/actions/check-is-fork
id: check
with:
in-fork-message: 'Renovate workflow only can run in the main repository, skipping.'
renovate:
runs-on: ubuntu-latest
needs: check-is-fork
if: needs.check-is-fork.outputs.is-fork != 'true'
timeout-minutes: 15
permissions:
contents: write
issues: write
pull-requests: write
checks: write
statuses: write
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v5
- name: Setup node
uses: actions/setup-node@v6
with:
node-version-file: .node-version
- name: Renovate
uses: renovatebot/github-action@v43.0.19
with:
configurationFile: .github/renovate.json5
token: ${{ steps.app-token.outputs.token }}
env:
LOG_LEVEL: debug

View File

@@ -0,0 +1,124 @@
name: Verify Source
on:
pull_request:
push:
branches:
- master
- develop
jobs:
build:
name: Build package
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
cache-dependency-path: '**/package-lock.json'
- name: Install dependencies
run: npm ci --no-audit --no-fund
- name: Build NodeJS package
run: npm run build
lint:
name: Lint
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
cache-dependency-path: '**/package-lock.json'
- name: Is normal pull request
# check if is not a release pull request
id: pr
run: echo "is_normal=$(echo ${{ github.base_ref != 'master' && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'meta') == false }})" >> $GITHUB_OUTPUT
- name: Detect changed files
uses: dorny/paths-filter@v3
id: changes
with:
list-files: shell
filters: |
docs:
- '*!(slugs).md'
- '.github/**.md'
icons:
- 'icons/*.svg'
slugs:
- 'slugs.md'
sdkts:
- 'sdk.d.ts'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Don't edit slugs.md in pull requests
if: steps.pr.outputs.is_normal == 'true' && steps.changes.outputs.slugs == 'true'
run: |
echo -ne "Detected slugs.md file edition in PR.\n" 1>&2
echo -ne "Please revert it, we build the slugs.md" 1>&2
echo -ne " file automatically at releases.\n" 1>&2
exit 1
- name: Don't edit sdk.d.ts in pull requests
if: steps.pr.outputs.is_normal == 'true' && steps.changes.outputs.sdkts == 'true'
run: |
echo -ne "Detected sdk.d.ts file edition in PR.\n" 1>&2
echo -ne "Please revert it, we build the sdk.d.ts" 1>&2
echo -ne " file automatically at releases.\n" 1>&2
exit 1
- name: Install dependencies
run: npm ci --no-audit --no-fund
- name: Prepare icons
if: steps.pr.outputs.is_normal == 'true' && steps.changes.outputs.icons == 'true'
run: sed -i 's/\\"icons\/\*\.svg\\"/$npm_config_icons/' package.json
- name: Prepare docs (docs changed)
# only lint changed docs
if: steps.pr.outputs.is_normal == 'true' && steps.changes.outputs.docs == 'true'
run: sed -i "s/'\*\*\/\*\.md'/"'$npm_config_docs'"/" package.json
- name: Prepare docs (no docs changed)
# only lint README.md if no changes in docs
if: steps.pr.outputs.is_normal == 'true' && steps.changes.outputs.docs != 'true'
run: sed -i "s/'\*\*\/\*\.md'/README.md/" package.json
- name: Run linter
run: npm run lint --icons="$ICONS_FILES" --docs="$DOCS_FILES"
env:
ICONS_FILES: ${{ steps.changes.outputs.icons_files }}
DOCS_FILES: ${{ steps.changes.outputs.docs_files }}
# Authorise GitHub API requests for editorconfig-checker
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check documentation links
if: steps.changes.outputs.docs == 'true'
uses: lycheeverse/lychee-action@v2
with:
args: -- ${{ steps.changes.outputs.docs_files }}
fail: ${{ github.ref != 'refs/heads/develop' }}
failIfEmpty: false
jobSummary: true
format: markdown
token: ${{ secrets.GITHUB_TOKEN }}
test:
name: Test package
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
cache-dependency-path: '**/package-lock.json'
- name: Install dependencies
run: npm ci --no-audit --no-fund
- name: Run tests
run: npm run test