github actions: `test-and-upload.yml` 中,移除 `release` 相关脚本。

pull/391/head
王良 2024-11-16 01:09:26 +08:00
parent 1a3918b402
commit c3d614c5e1
2 changed files with 2 additions and 56 deletions

View File

@ -2,6 +2,8 @@ name: 'Build And Release'
on: on:
push: push:
branches:
- release
tags: tags:
- '*' - '*'

View File

@ -4,14 +4,12 @@ on:
push: push:
branches: branches:
- master - master
- release
- '1.x' - '1.x'
pull_request: pull_request:
branches: branches:
- master - master
jobs: jobs:
# job 1
test-and-upload: test-and-upload:
runs-on: ${{ matrix.os }}-latest runs-on: ${{ matrix.os }}-latest
strategy: strategy:
@ -135,57 +133,3 @@ jobs:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.dmg path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.dmg
name: 'DevSidecar-${{ steps.package-info.outputs.version }}.dmg' name: 'DevSidecar-${{ steps.package-info.outputs.version }}.dmg'
if-no-files-found: error if-no-files-found: error
# job 2
download-and-release:
if: ${{ github.ref_name == 'release' }}
runs-on: ubuntu-latest
needs:
- test-and-upload
steps:
- name: 'Checkout'
uses: actions/checkout@v4.1.7
- name: 'Get package info'
id: package-info
uses: luizfelipelaviola/get-package-info@v1
with:
path: ./packages/mitmproxy
- name: 'Make "release" dir'
run: mkdir release
# Download artifacts
- name: 'Download DevSidecar-${{ steps.package-info.outputs.version }}.exe - Windows'
uses: actions/download-artifact@v4.1.8
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}.exe
path: release
- name: 'Download DevSidecar-${{ steps.package-info.outputs.version }}.deb - Ubuntu'
uses: actions/download-artifact@v4.1.8
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}.deb
path: release
- name: 'Download DevSidecar-${{ steps.package-info.outputs.version }}.AppImage - Ubuntu'
uses: actions/download-artifact@v4.1.8
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}.AppImage
path: release
- name: 'Download DevSidecar-${{ steps.package-info.outputs.version }}.dmg - Mac'
uses: actions/download-artifact@v4.1.8
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}.dmg
path: release
- name: 'Print files from "release" dir'
run: |
ls -lah release;
- name: 'Create a draft release'
uses: wangliang181230/github-action-ghr@master
env:
GITHUB_TOKEN: ${{ github.token }}
GHR_PATH: release/
GHR_TITLE: ${{ github.ref_name }}
GHR_REPLACE: true
GHR_DRAFT: true