simple-icons/.github/workflows/publish.yml

131 lines
4.1 KiB
YAML
Raw Normal View History

name: Publish Releases
on:
push:
branches:
- master
jobs:
sanity-check:
name: Pre-publish checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm i
- 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
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
Add some icons in Readme (#4816) * Add some icons in Readme * Align icons at left * Add some more icons * Remove inline image - Use relative icons path * Format Third Party Extensions as a table * force website build * added readme-icons foler with icons for the readme.md file, as well as icons for light and dark modes in the readme.md titles * restored corrupted svgs for readme-icons * moved the icons to asset/readme, added icons for Drawio, Hexo and Jetpack Compose * - Use `develop` branch absolutified links for README images - Strip dark image theme links before publish to Github and npm - Clean third party extensions table * Commit to tag (ony inside master branch) * Fix differences in README * Reintroduce link in README logo * Drop uneeded newline from README * Fix error in README * Add newlines for SVGs * Newlines for all SVGs * Reuse black icons from library * Commit using Github Actions bot * Reuse diagrams.net library icon for white version * Fix comment * Bump 'strip-gh-theme-links' action to v2 * removed assets/readme icons * Test with 'fill=white' * Test with 'style="fill:white"' * added filter:invert(1) to PHP, TS, Simple Icons and Blender * added readme-icons test, changed the name of light icons in assets/readme * reloaded icons in Readme * fixed typo in iconsPath for readme-icons test * fixed typo on the darkiconsPath resolution * restored absolute paths * minimized the white icons on assets/readme * restored test scripts * Apply changes * Disable color output testing in CI * Revert latest change Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com> Co-authored-by: Álvaro Mondéjar <mondejar1994@gmail.com> Co-authored-by: Jorge Amado Soria Ramirez <darksoul.uci@gmail.com>
2022-01-10 00:04:36 +03:00
- name: Remove dark theme images from README
uses: mondeja/strip-gh-theme-links@v4
Add some icons in Readme (#4816) * Add some icons in Readme * Align icons at left * Add some more icons * Remove inline image - Use relative icons path * Format Third Party Extensions as a table * force website build * added readme-icons foler with icons for the readme.md file, as well as icons for light and dark modes in the readme.md titles * restored corrupted svgs for readme-icons * moved the icons to asset/readme, added icons for Drawio, Hexo and Jetpack Compose * - Use `develop` branch absolutified links for README images - Strip dark image theme links before publish to Github and npm - Clean third party extensions table * Commit to tag (ony inside master branch) * Fix differences in README * Reintroduce link in README logo * Drop uneeded newline from README * Fix error in README * Add newlines for SVGs * Newlines for all SVGs * Reuse black icons from library * Commit using Github Actions bot * Reuse diagrams.net library icon for white version * Fix comment * Bump 'strip-gh-theme-links' action to v2 * removed assets/readme icons * Test with 'fill=white' * Test with 'style="fill:white"' * added filter:invert(1) to PHP, TS, Simple Icons and Blender * added readme-icons test, changed the name of light icons in assets/readme * reloaded icons in Readme * fixed typo in iconsPath for readme-icons test * fixed typo on the darkiconsPath resolution * restored absolute paths * minimized the white icons on assets/readme * restored test scripts * Apply changes * Disable color output testing in CI * Revert latest change Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com> Co-authored-by: Álvaro Mondéjar <mondejar1994@gmail.com> Co-authored-by: Jorge Amado Soria Ramirez <darksoul.uci@gmail.com>
2022-01-10 00:04:36 +03:00
with:
files: README.md
keep: light
Add some icons in Readme (#4816) * Add some icons in Readme * Align icons at left * Add some more icons * Remove inline image - Use relative icons path * Format Third Party Extensions as a table * force website build * added readme-icons foler with icons for the readme.md file, as well as icons for light and dark modes in the readme.md titles * restored corrupted svgs for readme-icons * moved the icons to asset/readme, added icons for Drawio, Hexo and Jetpack Compose * - Use `develop` branch absolutified links for README images - Strip dark image theme links before publish to Github and npm - Clean third party extensions table * Commit to tag (ony inside master branch) * Fix differences in README * Reintroduce link in README logo * Drop uneeded newline from README * Fix error in README * Add newlines for SVGs * Newlines for all SVGs * Reuse black icons from library * Commit using Github Actions bot * Reuse diagrams.net library icon for white version * Fix comment * Bump 'strip-gh-theme-links' action to v2 * removed assets/readme icons * Test with 'fill=white' * Test with 'style="fill:white"' * added filter:invert(1) to PHP, TS, Simple Icons and Blender * added readme-icons test, changed the name of light icons in assets/readme * reloaded icons in Readme * fixed typo in iconsPath for readme-icons test * fixed typo on the darkiconsPath resolution * restored absolute paths * minimized the white icons on assets/readme * restored test scripts * Apply changes * Disable color output testing in CI * Revert latest change Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com> Co-authored-by: Álvaro Mondéjar <mondejar1994@gmail.com> Co-authored-by: Jorge Amado Soria Ramirez <darksoul.uci@gmail.com>
2022-01-10 00:04:36 +03:00
strict: true
- name: Install dependencies
run: npm i
- name: Build NodeJS package
run: npm run build
- name: Deploy to NPM
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
github:
name: GitHub release
needs: sanity-check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get commit message (for release title and body)
id: commit
uses: kceb/git-message-action@v2
- name: Get release version
id: get-version
run: |
export PACKAGE_VERSION=$(cat package.json | grep 'version' | sed 's/[ \",:]//g' | sed 's/version//')
echo "::set-output name=version::$PACKAGE_VERSION"
Add some icons in Readme (#4816) * Add some icons in Readme * Align icons at left * Add some more icons * Remove inline image - Use relative icons path * Format Third Party Extensions as a table * force website build * added readme-icons foler with icons for the readme.md file, as well as icons for light and dark modes in the readme.md titles * restored corrupted svgs for readme-icons * moved the icons to asset/readme, added icons for Drawio, Hexo and Jetpack Compose * - Use `develop` branch absolutified links for README images - Strip dark image theme links before publish to Github and npm - Clean third party extensions table * Commit to tag (ony inside master branch) * Fix differences in README * Reintroduce link in README logo * Drop uneeded newline from README * Fix error in README * Add newlines for SVGs * Newlines for all SVGs * Reuse black icons from library * Commit using Github Actions bot * Reuse diagrams.net library icon for white version * Fix comment * Bump 'strip-gh-theme-links' action to v2 * removed assets/readme icons * Test with 'fill=white' * Test with 'style="fill:white"' * added filter:invert(1) to PHP, TS, Simple Icons and Blender * added readme-icons test, changed the name of light icons in assets/readme * reloaded icons in Readme * fixed typo in iconsPath for readme-icons test * fixed typo on the darkiconsPath resolution * restored absolute paths * minimized the white icons on assets/readme * restored test scripts * Apply changes * Disable color output testing in CI * Revert latest change Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com> Co-authored-by: Álvaro Mondéjar <mondejar1994@gmail.com> Co-authored-by: Jorge Amado Soria Ramirez <darksoul.uci@gmail.com>
2022-01-10 00:04:36 +03:00
- name: Remove dark theme images from README
uses: mondeja/strip-gh-theme-links@v4
Add some icons in Readme (#4816) * Add some icons in Readme * Align icons at left * Add some more icons * Remove inline image - Use relative icons path * Format Third Party Extensions as a table * force website build * added readme-icons foler with icons for the readme.md file, as well as icons for light and dark modes in the readme.md titles * restored corrupted svgs for readme-icons * moved the icons to asset/readme, added icons for Drawio, Hexo and Jetpack Compose * - Use `develop` branch absolutified links for README images - Strip dark image theme links before publish to Github and npm - Clean third party extensions table * Commit to tag (ony inside master branch) * Fix differences in README * Reintroduce link in README logo * Drop uneeded newline from README * Fix error in README * Add newlines for SVGs * Newlines for all SVGs * Reuse black icons from library * Commit using Github Actions bot * Reuse diagrams.net library icon for white version * Fix comment * Bump 'strip-gh-theme-links' action to v2 * removed assets/readme icons * Test with 'fill=white' * Test with 'style="fill:white"' * added filter:invert(1) to PHP, TS, Simple Icons and Blender * added readme-icons test, changed the name of light icons in assets/readme * reloaded icons in Readme * fixed typo in iconsPath for readme-icons test * fixed typo on the darkiconsPath resolution * restored absolute paths * minimized the white icons on assets/readme * restored test scripts * Apply changes * Disable color output testing in CI * Revert latest change Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com> Co-authored-by: Álvaro Mondéjar <mondejar1994@gmail.com> Co-authored-by: Jorge Amado Soria Ramirez <darksoul.uci@gmail.com>
2022-01-10 00:04:36 +03:00
with:
files: README.md
keep: light
Add some icons in Readme (#4816) * Add some icons in Readme * Align icons at left * Add some more icons * Remove inline image - Use relative icons path * Format Third Party Extensions as a table * force website build * added readme-icons foler with icons for the readme.md file, as well as icons for light and dark modes in the readme.md titles * restored corrupted svgs for readme-icons * moved the icons to asset/readme, added icons for Drawio, Hexo and Jetpack Compose * - Use `develop` branch absolutified links for README images - Strip dark image theme links before publish to Github and npm - Clean third party extensions table * Commit to tag (ony inside master branch) * Fix differences in README * Reintroduce link in README logo * Drop uneeded newline from README * Fix error in README * Add newlines for SVGs * Newlines for all SVGs * Reuse black icons from library * Commit using Github Actions bot * Reuse diagrams.net library icon for white version * Fix comment * Bump 'strip-gh-theme-links' action to v2 * removed assets/readme icons * Test with 'fill=white' * Test with 'style="fill:white"' * added filter:invert(1) to PHP, TS, Simple Icons and Blender * added readme-icons test, changed the name of light icons in assets/readme * reloaded icons in Readme * fixed typo in iconsPath for readme-icons test * fixed typo on the darkiconsPath resolution * restored absolute paths * minimized the white icons on assets/readme * restored test scripts * Apply changes * Disable color output testing in CI * Revert latest change Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com> Co-authored-by: Álvaro Mondéjar <mondejar1994@gmail.com> Co-authored-by: Jorge Amado Soria Ramirez <darksoul.uci@gmail.com>
2022-01-10 00:04:36 +03:00
strict: true
- name: Configure GIT credentials
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
# Commit that will only be included in the tag
Add some icons in Readme (#4816) * Add some icons in Readme * Align icons at left * Add some more icons * Remove inline image - Use relative icons path * Format Third Party Extensions as a table * force website build * added readme-icons foler with icons for the readme.md file, as well as icons for light and dark modes in the readme.md titles * restored corrupted svgs for readme-icons * moved the icons to asset/readme, added icons for Drawio, Hexo and Jetpack Compose * - Use `develop` branch absolutified links for README images - Strip dark image theme links before publish to Github and npm - Clean third party extensions table * Commit to tag (ony inside master branch) * Fix differences in README * Reintroduce link in README logo * Drop uneeded newline from README * Fix error in README * Add newlines for SVGs * Newlines for all SVGs * Reuse black icons from library * Commit using Github Actions bot * Reuse diagrams.net library icon for white version * Fix comment * Bump 'strip-gh-theme-links' action to v2 * removed assets/readme icons * Test with 'fill=white' * Test with 'style="fill:white"' * added filter:invert(1) to PHP, TS, Simple Icons and Blender * added readme-icons test, changed the name of light icons in assets/readme * reloaded icons in Readme * fixed typo in iconsPath for readme-icons test * fixed typo on the darkiconsPath resolution * restored absolute paths * minimized the white icons on assets/readme * restored test scripts * Apply changes * Disable color output testing in CI * Revert latest change Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com> Co-authored-by: Álvaro Mondéjar <mondejar1994@gmail.com> Co-authored-by: Jorge Amado Soria Ramirez <darksoul.uci@gmail.com>
2022-01-10 00:04:36 +03:00
- name: Commit dark theme images strip
run: |
git add README.md
git commit -m 'Strip README dark theme image links'
- name: Create and push git tag
run: |
set -e
tag="${{ steps.get-version.outputs.version }}"
git tag -a "${tag}" -m "${{ steps.commit.outputs.git-message }}"
git push origin "${tag}"
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get-version.outputs.version }}
release_name: ${{ steps.commit.outputs.title }}
body: ${{ steps.commit.outputs.body }}
font:
name: Trigger simple-icons-font release
needs: npm
runs-on: ubuntu-latest
steps:
- name: Trigger simple-icons-font release
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.REMOTE_DISPATCH_TOKEN }}" \
-d '{"ref":"develop"}' \
https://api.github.com/repos/simple-icons/simple-icons-font/actions/workflows/auto-release.yml/dispatches
website:
name: Trigger simple-icons-website update
needs: npm
runs-on: ubuntu-latest
steps:
- name: Trigger simple-icons-website update
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.REMOTE_DISPATCH_TOKEN }}" \
-d '{"ref":"master"}' \
https://api.github.com/repos/simple-icons/simple-icons-website/actions/workflows/auto-release.yml/dispatches