Skip to content

Commit

Permalink
test-and-upload.yml中,也发布一个 draft release
Browse files Browse the repository at this point in the history
  • Loading branch information
wangliang181230 committed Oct 1, 2024
1 parent 59aead2 commit 4fe2c56
Showing 1 changed file with 87 additions and 0 deletions.
87 changes: 87 additions & 0 deletions .github/workflows/test-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,90 @@ jobs:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.dmg
name: "DevSidecar-${{ steps.package-info.outputs.version }}-node${{ matrix.node }}.dmg"
if-no-files-found: error

# job 2
download-and-release:
runs-on: ubuntu-latest
needs:
- test-and-upload
steps:
- name: "Checkout"
uses: actions/[email protected]

- 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 with node16
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-node16.exe - Windows"
uses: actions/[email protected]
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-node16.exe
path: release
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-node16.deb - Ubuntu"
uses: actions/[email protected]
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-node16.deb
path: release
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-node16.AppImage - Ubuntu"
uses: actions/[email protected]
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-node16.AppImage
path: release
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-node16.dmg - Mac"
uses: actions/[email protected]
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-node16.dmg
path: release
- name: "Rename 'release/DevSidecar-${{ steps.package-info.outputs.version }}.*' to 'release/DevSidecar-${{ steps.package-info.outputs.version }}-node16.*'"
run: |
mv release/DevSidecar-${{ steps.package-info.outputs.version }}.exe release/DevSidecar-${{ steps.package-info.outputs.version }}-node16.exe;
mv release/DevSidecar-${{ steps.package-info.outputs.version }}.deb release/DevSidecar-${{ steps.package-info.outputs.version }}-node16.deb;
mv release/DevSidecar-${{ steps.package-info.outputs.version }}.AppImage release/DevSidecar-${{ steps.package-info.outputs.version }}-node16.AppImage;
mv release/DevSidecar-${{ steps.package-info.outputs.version }}.dmg release/DevSidecar-${{ steps.package-info.outputs.version }}-node16.dmg;
# Download artifacts with node17
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-node17.exe - Windows"
uses: actions/[email protected]
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-node17.exe
path: release
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-node17.deb - Ubuntu"
uses: actions/[email protected]
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-node17.deb
path: release
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-node17.AppImage - Ubuntu"
uses: actions/[email protected]
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-node17.AppImage
path: release
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-node17.dmg - Mac"
uses: actions/[email protected]
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-node17.dmg
path: release
- name: "Rename 'release/DevSidecar-${{ steps.package-info.outputs.version }}.*' to 'release/DevSidecar-${{ steps.package-info.outputs.version }}-node17.*'"
run: |
mv release/DevSidecar-${{ steps.package-info.outputs.version }}.exe release/DevSidecar-${{ steps.package-info.outputs.version }}-node17.exe;
mv release/DevSidecar-${{ steps.package-info.outputs.version }}.deb release/DevSidecar-${{ steps.package-info.outputs.version }}-node17.deb;
mv release/DevSidecar-${{ steps.package-info.outputs.version }}.AppImage release/DevSidecar-${{ steps.package-info.outputs.version }}-node17.AppImage;
mv release/DevSidecar-${{ steps.package-info.outputs.version }}.dmg release/DevSidecar-${{ steps.package-info.outputs.version }}-node17.dmg;
- name: "Print files from 'release' dir"
run: |
ls -lah release;
- name: "Create a draft release"
uses: fnkr/github-action-ghr@ghr-options
env:
GITHUB_TOKEN: ${{ github.token }}
GHR_PATH: release/
GHR_TITLE: ${{ github.ref_name }}
GHR_REPLACE: true
GHR_DRAFT: true

0 comments on commit 4fe2c56

Please sign in to comment.