Skip to content

v1.8.5

v1.8.5 #2

name: "Build And Release"
on:
push:
tags: [ "*" ]
jobs:
# job 1
build-and-upload:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [
windows-latest,
ubuntu-latest,
macos-latest
]
node: [
16
]
lerna: [
6
]
steps:
- name: "Checkout"
uses: actions/[email protected]
- name: "Setup Node.js environment"
uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
registry-url: https://npm.pkg.github.com/
- name: "Get package info"
id: package-info
uses: luizfelipelaviola/get-package-info@v1
with:
path: ./packages/mitmproxy
- name: "Print"
run: |
echo "version = ${{ steps.package-info.outputs.version }}";
echo "github.ref_type = ${{ github.ref_type }}";
echo "github.ref = ${{ github.ref }}";
echo "github.ref_name = ${{ github.ref_name }}";
- name: "npm install lerna/yarn"
run: |
echo "======================================================================";
dir || ls -lah;
echo "======================================================================";
echo "npm install lerna@${{ matrix.lerna }} -g";
echo "--------------------";
npm install lerna@${{ matrix.lerna }} -g;
echo "======================================================================";
echo "npm install yarn";
echo "--------------------";
npm install yarn;
- name: "npm -v | lerna -v | yarn -v"
run: |
echo "======================================================================";
echo "lerna -v";
echo "--------------------";
lerna -v;
echo "======================================================================";
echo "npm -v";
echo "--------------------";
npm -v;
echo "======================================================================";
echo "yarn -v";
echo "--------------------";
yarn -v;
- name: "lerna bootstrap"
run: |
echo "======================================================================";
dir || ls -lah;
echo "======================================================================";
echo "lerna bootstrap --npm-client=yarn";
echo "--------------------";
lerna bootstrap --npm-client=yarn;
- name: "npm run electron:build"
run: |
echo "======================================================================";
dir || ls -lah;
echo "======================================================================";
echo "cd packages/gui";
echo "--------------------";
cd packages/gui;
echo "======================================================================";
dir || ls -lah;
echo "======================================================================";
echo "npm run electron:build";
echo "--------------------";
npm run electron:build;
echo "======================================================================";
cd dist_electron;
dir || ls -lah;
cd ../../../;
- name: "Upload DevSidecar-${{ steps.package-info.outputs.version }}.exe"
uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'windows-latest' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.exe
name: "DevSidecar-${{ steps.package-info.outputs.version }}.exe"
if-no-files-found: error
- name: "Upload DevSidecar-${{ steps.package-info.outputs.version }}.deb"
uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.deb
name: "DevSidecar-${{ steps.package-info.outputs.version }}.deb"
if-no-files-found: error
- name: "Upload DevSidecar-${{ steps.package-info.outputs.version }}.AppImage"
uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.AppImage
name: "DevSidecar-${{ steps.package-info.outputs.version }}.AppImage"
if-no-files-found: error
- name: "Upload DevSidecar-${{ steps.package-info.outputs.version }}.dmg "
uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'macos-11' || matrix.os == 'macos-12' || matrix.os == 'macos-13' || matrix.os == 'macos-latest' }}
with:
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:
runs-on: ubuntu-latest
needs:
- build-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
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}.exe"
uses: actions/download-artifact@v3
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}.exe
path: release
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}.deb"
uses: actions/download-artifact@v3
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}.deb
path: release
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}.AppImage"
uses: actions/download-artifact@v3
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}.AppImage
path: release
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}.dmg"
uses: actions/download-artifact@v3
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}.dmg
path: release
- name: "Print"
run: |
ls -lah release;
- name: "Create a draft release"
uses: fnkr/github-action-ghr@ghr-options
env:
GHR_PATH: release/
GITHUB_TOKEN: ${{ github.token }}
GHR_REPLACE: true
GHR_TITLE: ${{ github.ref_name }}
GHR_DRAFT: true