From 25ec3c14211bd0de842827289909493e84ca40bc Mon Sep 17 00:00:00 2001 From: Oleg Baltag Date: Wed, 5 Jun 2024 10:37:43 +0300 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 27 +++++++++++++++++++-------- package-lock.json | 4 ++-- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e13f0eaf..1a4088a1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,11 +3,11 @@ name: Codicons Release on: push: - branches: [ main ] - tags: - - '*' # Only runs on annotated tags + branches: [main] + tags: + - "*" # Only runs on annotated tags pull_request: - branches: [ main ] + branches: [main] workflow_dispatch: jobs: @@ -20,7 +20,7 @@ jobs: fetch-depth: 0 # All history - uses: actions/setup-node@v4 with: - node-version: '16' + node-version: "16" - name: Install dependencies run: npm install @@ -40,7 +40,7 @@ jobs: echo EOF } >> "$GITHUB_ENV" - - name: Create Release + - name: Create Release if: startsWith(github.ref, 'refs/tags/') id: create_release uses: actions/create-release@v1 @@ -53,13 +53,24 @@ jobs: prerelease: false body: ${{ env.release_notes }} - - name: Upload Release Asset + - name: Upload Release Asset (codicon.ttf) if: startsWith(github.ref, 'refs/tags/') uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./dist/codicon.ttf asset_name: codicon-font-${{ github.ref_name }}.ttf asset_content_type: application/x-font-ttf + + - name: Upload Release Asset (codicon.svg) + if: startsWith(github.ref, 'refs/tags/') + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./dist/codicon.svg + asset_name: codicon-font-${{ github.ref_name }}.svg + asset_content_type: image/svg+xml diff --git a/package-lock.json b/package-lock.json index f1690bbf..fc9778d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@vscode/codicons", - "version": "0.0.35", + "version": "0.0.36", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@vscode/codicons", - "version": "0.0.35", + "version": "0.0.36", "license": "CC-BY-4.0", "devDependencies": { "ansi-regex": ">=5.0.1",