Merge pull request #351 from netease-lcap/test #140
This file contains hidden or 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: Build Assets | |
| on: | |
| push: | |
| branches: | |
| - release/* | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Use Node.js 18 | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - name: Install pnpm | |
| run: npm install -g pnpm@9.10.0 | |
| - name: Install Dependencies | |
| run: pnpm i | |
| - name: Get current branch name | |
| run: echo "BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV | |
| # 使用package.json中的版本号 | |
| - name: Get version from package.json | |
| if: ${{ !env.VERSION }} | |
| run: echo "VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV | |
| - name: Build | |
| run: LCAP_RELEASE=1 pnpm build && node ./scripts/copy-assets.js --version ${{ env.VERSION }} | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: 'lcap-template@${{ env.VERSION }}' | |
| path: temp | |
| call-giselle: | |
| needs: build | |
| uses: vusion-templates/giselle/.github/workflows/release-lcap-template.yml@master | |
| secrets: inherit |