ci: use Gitea-compatible artifact actions for multi-job workflow
@@ -5,8 +5,8 @@ on:
|
|||||||
types: [published]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-deploy:
|
build:
|
||||||
name: Build, Release and Deploy
|
name: Build release archive
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -30,6 +30,24 @@ jobs:
|
|||||||
- name: Build release archive
|
- name: Build release archive
|
||||||
run: pnpm build:tar
|
run: pnpm build:tar
|
||||||
|
|
||||||
|
- name: Upload build artifact
|
||||||
|
uses: maxsargentdev/gitea-upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: dist-archive
|
||||||
|
path: dist.tar.gz
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
upload-release-asset:
|
||||||
|
name: Upload to Gitea Release
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download build artifact
|
||||||
|
uses: christopherHX/gitea-download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: dist-archive
|
||||||
|
|
||||||
- name: Upload to Gitea Release
|
- name: Upload to Gitea Release
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
@@ -42,6 +60,17 @@ jobs:
|
|||||||
--data-binary "@dist.tar.gz" \
|
--data-binary "@dist.tar.gz" \
|
||||||
"${URL}"
|
"${URL}"
|
||||||
|
|
||||||
|
deploy-to-server:
|
||||||
|
name: Deploy to onixbyte.cn
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download build artifact
|
||||||
|
uses: christopherHX/gitea-download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: dist-archive
|
||||||
|
|
||||||
- name: Upload archive to server
|
- name: Upload archive to server
|
||||||
env:
|
env:
|
||||||
DEPLOY_HOST: ${{ vars.DEPLOY_HOST }}
|
DEPLOY_HOST: ${{ vars.DEPLOY_HOST }}
|
||||||
|
|||||||