fix: 修复processSingleInput中input未正确赋值的问题 #8
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 | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "package.json" | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - "package.json" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: "main" | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "20" | |
| - name: Install dependencies | |
| run: | | |
| npm install -g pnpm | |
| pnpm i --no-frozen-lockfile | |
| - name: Bundle | |
| run: | | |
| pnpm build | |
| - id: tag | |
| name: Generate release tag | |
| run: | | |
| SUBSTORE_RELEASE=`node --eval="process.stdout.write(require('./package.json').version)"` | |
| echo "release_tag=$SUBSTORE_RELEASE" >> $GITHUB_OUTPUT | |
| - name: Prepare release | |
| run: | | |
| pnpm i -D conventional-changelog-cli | |
| npx conventional-changelog -p cli -i CHANGELOG.md -s | |
| - name: Release | |
| uses: softprops/action-gh-release@v1 | |
| if: ${{ success() }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| body_path: ./CHANGELOG.md | |
| tag_name: ${{ steps.tag.outputs.release_tag }} | |
| # generate_release_notes: true | |
| files: | | |
| ./dist/_worker.js | |
| - name: Git push assets to "release" branch | |
| run: | | |
| cd dist || exit 1 | |
| git init | |
| git config --local user.name "github-actions[bot]" | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git checkout -b release | |
| git add . | |
| git commit -m "release: ${{ steps.tag.outputs.release_tag }}" | |
| git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}" | |
| git push -f -u origin release | |
| # - name: Sync to GitLab | |
| # env: | |
| # GITLAB_PIPELINE_TOKEN: ${{ secrets.GITLAB_PIPELINE_TOKEN }} | |
| # run: | | |
| # curl -X POST --fail -F token=$GITLAB_PIPELINE_TOKEN -F ref=master https://gitlab.com/api/v4/projects/48891296/trigger/pipeline |