Skip to content

try: exclude github dir from uploading (#232) #37

try: exclude github dir from uploading (#232)

try: exclude github dir from uploading (#232) #37

Workflow file for this run

name: Publish Monochrome PRO to S3
on:
push:
tags:
- '*'
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- name: Extract Version
id: extract_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.11.0
- name: Download & Build Icons
run: npm ci --progress=false && npm run update-json && npm run line:build && npm run solid:build && npm run thinline:build && npm run monochrome:build
env:
CI_COMMIT_REF_NAME: ${{ steps.extract_version.outputs.VERSION }}
API_DOWNLOAD_LINE: ${{ secrets.API_DOWNLOAD_LINE }}
API_DOWNLOAD_SOLID: ${{ secrets.API_DOWNLOAD_SOLID_PRO }}
API_DOWNLOAD_THINLINE: ${{ secrets.API_DOWNLOAD_THINLINE_PRO }}
API_DOWNLOAD_MONOCHROME: ${{ secrets.API_DOWNLOAD_MONOCHROME_PRO }}
RELEASE_DIR: 'release-pro'
- name: Publish to CDN
uses: jakejarvis/s3-sync-action@master
with:
args: --no-progress --exclude '.git/*' --exclude 'node_modules/*' --exclude 'build/*' --exclude '.github/*' --exclude 'github/*'
env:
AWS_S3_BUCKET: 'unicons-iconscout-a5996f0'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DEST_DIR: 'release-pro/${{ steps.extract_version.outputs.VERSION }}'
- name: Publish to NPM
run: printf "@iconscout:registry=https://npm-proxy.fury.io/iconscout/\n//npm-proxy.fury.io/iconscout/:_authToken=${NPM_TOKEN}" > ~/.npmrc && npm publish
env:
NPM_TOKEN: ${{ secrets.FURY_AUTH_TOKEN }}