diff --git a/.github/publish_code_connect/action.yml b/.github/publish_code_connect/action.yml deleted file mode 100644 index c57ed475..00000000 --- a/.github/publish_code_connect/action.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: "Publish Code Connect" -description: "Publish code connect files" -inputs: - figma-access-token: - description: "The personal access token given by Figma. Required to make API calls" - required: true - -runs: - using: "node20" - main: "index.js" diff --git a/.github/publish_code_connect/index.js b/.github/publish_code_connect/index.js deleted file mode 100644 index 495c1cb8..00000000 --- a/.github/publish_code_connect/index.js +++ /dev/null @@ -1,13 +0,0 @@ -import core from "@actions/core"; -import util from "util"; -import { exec } from "child_process"; -const asyncExec = util.promisify(exec); - -const FIGMA_ACCESS_TOKEN = core.getInput("figma-access-token") || process.env.FIGMA_ACCESS_TOKEN; - -const { stdout, stderr } = await asyncExec(`npx figma connect publish --token ${FIGMA_ACCESS_TOKEN}`, { - cwd: "../..", -}); - -console.log(stdout); -console.error(stderr); diff --git a/.github/workflows/on-release.yml b/.github/workflows/on-release.yml index b61decaa..afef149e 100644 --- a/.github/workflows/on-release.yml +++ b/.github/workflows/on-release.yml @@ -23,14 +23,12 @@ jobs: run: npm ci - name: Compile Typescript files run: tsc - - name: Publish - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + # - name: Publish + # run: npm publish + # env: + # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Publish code connect - uses: ./.github/publish_code_connect - with: - figma-access-token: ${{ secrets.FIGMA_PERSONAL_ACCESS_TOKEN }} + run: npx figma connect publish --token ${{ secrets.FIGMA_PERSONAL_ACCESS_TOKEN}} update_npm_dependencies: needs: publish