feat: 脚本链接的末尾加上 #noCache 关闭缓存 #252
This file contains 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: | |
push: | |
branches: | |
- master | |
paths: | |
- "backend/package.json" | |
pull_request: | |
branches: | |
- master | |
paths: | |
- "backend/package.json" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: "master" | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "16" | |
- name: Install dependencies | |
run: | | |
npm install -g pnpm | |
cd backend && pnpm i | |
- name: Test | |
run: | | |
cd backend | |
pnpm test | |
- name: Build | |
run: | | |
cd backend | |
pnpm run build | |
- name: Bundle | |
run: | | |
cd backend | |
pnpm i -D estrella | |
pnpm run bundle | |
- id: tag | |
name: Generate release tag | |
run: | | |
cd backend | |
SUBSTORE_RELEASE=`node --eval="process.stdout.write(require('./package.json').version)"` | |
echo "::set-output name=release_tag::$SUBSTORE_RELEASE" | |
- name: Prepare release | |
run: | | |
cd backend | |
pnpm i -D conventional-changelog-cli | |
pnpm run changelog | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
body_path: ./backend/CHANGELOG.md | |
tag_name: ${{ steps.tag.outputs.release_tag }} | |
files: | | |
./backend/sub-store.min.js | |
./backend/dist/sub-store-0.min.js | |
./backend/dist/sub-store-1.min.js | |
./backend/dist/sub-store-parser.loon.min.js | |
./backend/dist/cron-sync-artifacts.min.js | |
./backend/dist/sub-store.bundle.js | |
- 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 |