Skip to content

Release 9.17.0

Release 9.17.0 #175

Workflow file for this run

name: Publish
on:
push:
branches:
- master
pull_request:
permissions:
contents: write
jobs:
npm:
name: NPM Package
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-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Remove dark theme images from README
uses: mondeja/strip-gh-theme-links@v4
with:
files: README.md
keep: light
strict: true
- name: Install dependencies
run: npm ci
- name: Build NodeJS package
run: npm run build
- name: Deploy to NPM
if: github.ref == 'refs/heads/master'
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
github:
name: GitHub release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- 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"
- name: Remove dark theme images from README
uses: mondeja/strip-gh-theme-links@v4
with:
files: README.md
keep: light
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
- 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
if: github.ref == 'refs/heads/master'
run: |
set -e
tag="${{ steps.get-version.outputs.version }}"
git tag -a "${tag}" -m ""
git push origin "${tag}"
- 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-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Create GitHub release
if: github.ref == 'refs/heads/master'
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get-version.outputs.version }}
release_name: Release ${{ steps.get-version.outputs.version }}
body: |
See https://github.com/simple-icons/simple-icons/releases/tag/${{ steps.get-version.outputs.version }}
- name: Compress release assets
run: |
cp node_modules/simple-icons/DISCLAIMER.md DISCLAIMER.md
zip -r simple-icons-font-${{ steps.get-version.outputs.version }}.zip font/ DISCLAIMER.md LICENSE.md
- uses: shogo82148/actions-upload-release-asset@v1
if: github.ref == 'refs/heads/master'
name: Upload release assets
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: simple-icons-font-${{ steps.get-version.outputs.version }}.zip
- name: Upload compressed fonts ZIP
uses: actions/upload-artifact@v3
with:
name: simple-icons-font-${{ steps.get-version.outputs.version }}
path: simple-icons-font-${{ steps.get-version.outputs.version }}.zip