Upload Figma Plugin/Widget to release page #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Upload Figma Plugin/Widget to release page | |
on: | |
release: | |
types: [published] | |
jobs: | |
init: | |
uses: ./.github/workflows/00-init.yml | |
publish: | |
name: Upload Figma Plugin/Widget to release page | |
runs-on: ubuntu-latest | |
needs: [init] | |
strategy: | |
fail-fast: false | |
matrix: | |
package: [handover] | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- name: ⏬ Checkout repo | |
uses: actions/checkout@v4 | |
- name: 🔄 Init Cache | |
uses: ./.github/actions/npm-cache | |
- name: 🔨 Build Packages | |
run: npm run build:${{ matrix.package }} | |
- name: ⏫ Upload Release Assets | |
id: upload-release-asset | |
uses: actions/github-script@v7 | |
env: | |
ICON_RELEASE_ID: ${{ vars.ICON_RELEASE_ID }} | |
with: | |
result-encoding: json | |
script: | | |
const { default: release } = await import('${{ github.workspace }}/.github/scripts/release/index.js'); | |
const workspace = '${{ github.workspace }}'; | |
const zipName = '${{ matrix.package }}'; | |
const srcDir = 'packages/${{ matrix.package }}'; | |
return await release({github, context, workspace, zipName, srcDir}) |