diff --git a/.github/workflows/generator.yml b/.github/workflows/generator.yml index 71212f0..2b85c00 100644 --- a/.github/workflows/generator.yml +++ b/.github/workflows/generator.yml @@ -13,6 +13,7 @@ on: options: - golang - javascript + - javascript(pnpm) REPO: description: "github repo name: MetaCubeX/Clash.Meta" @@ -78,6 +79,23 @@ jobs: tar --create --auto-compress --file /tmp/${P}-node_modules.tar.xz node_modules rm -rf node_modules + - name: Setup pnpm + if: inputs.LANG == 'javascript(pnpm)' + uses: pnpm/action-setup@v2 + with: + version: 6.0.2 + + - name: Generate javascript(pnpm) node_modules + if: inputs.LANG == 'javascript(pnpm)' + env: + P: ${{ inputs.P }} + run: | + git tag ${P} -m "${P}-node_modules-pnpm.tar.xz" + cd input + pnpm install + tar --create --auto-compress --file /tmp/${P}-node_modules-pnpm.tar.xz node_modules + rm -rf node_modules + - name: push tag uses: ad-m/github-push-action@master with: @@ -101,3 +119,11 @@ jobs: files: | /tmp/${{ inputs.P }}-node_modules.tar.xz tag_name: ${{ inputs.P }} + + - name: upload javascript(pnpm) deps to release artifaces + if: inputs.LANG == 'javascript(pnpm)' + uses: softprops/action-gh-release@v1 + with: + files: | + /tmp/${{ inputs.P }}-node_modules-pnpm.tar.xz + tag_name: ${{ inputs.P }}