mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-14 10:06:08 +08:00
chore: Update GitHub action to automatically release new version
This commit is contained in:
parent
9677c7ebbd
commit
9fba3506f0
38
.github/workflows/main.yml
vendored
38
.github/workflows/main.yml
vendored
@ -21,16 +21,30 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: "14"
|
node-version: "14"
|
||||||
- name: Install dependencies
|
- 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: Commit changes
|
|
||||||
if: contains(github.event.head_commit.message, '#build')
|
|
||||||
run: |
|
run: |
|
||||||
git config user.email github-actions
|
npm install -g pnpm
|
||||||
git config user.name github-actions@github.com
|
cd backend && pnpm i
|
||||||
git add .
|
- name: Test
|
||||||
git commit -m "Release" -a
|
run: |
|
||||||
git push
|
cd backend
|
||||||
|
pnpm test
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cd backend
|
||||||
|
pnpm run build
|
||||||
|
- 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: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ steps.tag.outputs.release_tag }}
|
||||||
|
files: |
|
||||||
|
./backend/sub-store.min.js
|
||||||
|
./backend/dist/cron-sync-artifacts.min.js
|
||||||
|
./backend/dist/sub-store-parser.loon.min.js
|
||||||
|
Loading…
x
Reference in New Issue
Block a user