Skip to content

Commit

Permalink
Merge pull request #1 from st0nie/master
Browse files Browse the repository at this point in the history
add pnpm support
  • Loading branch information
peeweep authored Jun 16, 2023
2 parents 52e881b + c6f220d commit 9977744
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
options:
- golang
- javascript
- javascript(pnpm)

REPO:
description: "github repo name: MetaCubeX/Clash.Meta"
Expand Down Expand Up @@ -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:
Expand All @@ -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 }}

0 comments on commit 9977744

Please sign in to comment.