Browse Source

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

pull/391/head
王良 6 days ago
parent
commit
c3d614c5e1
  1. 2
      .github/workflows/build-and-release.yml
  2. 56
      .github/workflows/test-and-upload.yml

2
.github/workflows/build-and-release.yml

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

56
.github/workflows/test-and-upload.yml

@ -4,14 +4,12 @@ on:
push:
branches:
- master
- release
- '1.x'
pull_request:
branches:
- master
jobs:
# job 1
test-and-upload:
runs-on: ${{ matrix.os }}-latest
strategy:
@ -135,57 +133,3 @@ jobs:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.dmg
name: 'DevSidecar-${{ steps.package-info.outputs.version }}.dmg'
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

Loading…
Cancel
Save