From 292f227cceb795cf8e20b9f8a580cbb05a45cc84 Mon Sep 17 00:00:00 2001 From: Daeho Ro Date: Tue, 22 Oct 2024 22:18:23 +0900 Subject: [PATCH] update publish workflow and add intel macos build --- .github/workflows/publish.yml | 109 ++++------------------------------ 1 file changed, 13 insertions(+), 96 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3881ced5b..34c3ebf6c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,8 +3,15 @@ name: Publish on: workflow_dispatch jobs: - build-macos: - runs-on: macos-latest + build: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [macos-latest, macos-latest-large, ubuntu-latest, windows-2019] + opt: [--mac, --mac, --linux, --win] + dist: [dist-macOS-arm, dist-macOS-x86_64, dist-linux, dist-windows] + steps: - name: Setup node uses: actions/setup-node@v2 @@ -42,103 +49,13 @@ jobs: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | yarn set version 1.22.18 - yarn build --mac --publish always - - - name: Tar files - run: tar -cvf dist-macOS.tar dist_electron - - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: dist-macOS - path: dist-macOS.tar - - build-linux: - runs-on: ubuntu-latest - steps: - - name: Setup node - uses: actions/setup-node@v2 - with: - node-version: '18.19.0' - - - name: Checkout Books - uses: actions/checkout@v2 - - - name: Install Dependencies - run: | - yarn set version 1.22.18 - yarn - - - name: Set Error Log Creds - env: - ERR_LOG_KEY: ${{ secrets.ERR_LOG_KEY }} - ERR_LOG_URL: ${{ secrets.ERR_LOG_URL }} - ERR_LOG_SECRET: ${{ secrets.ERR_LOG_SECRET }} - TELEMETRY_URL: ${{ secrets.TELEMETRY_URL }} - run: | - echo $ERR_LOG_KEY > log_creds.txt - echo $ERR_LOG_SECRET >> log_creds.txt - echo $ERR_LOG_URL >> log_creds.txt - echo $TELEMETRY_URL >> log_creds.txt - - - name: Run build - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - yarn set version 1.22.18 - yarn build --linux --publish always - - - name: Tar files - run: tar -cvf dist-linux.tar dist_electron - - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: dist-linux - path: dist-linux.tar - - build-windows: - runs-on: windows-2019 - defaults: - run: - shell: bash - - steps: - - name: Setup node - uses: actions/setup-node@v2 - with: - node-version: '18.19.0' - - - name: Checkout Books - uses: actions/checkout@v2 - - - name: Install Dependencies - run: yarn - - - name: Set Error Log Creds - env: - ERR_LOG_KEY: ${{ secrets.ERR_LOG_KEY }} - ERR_LOG_URL: ${{ secrets.ERR_LOG_URL }} - ERR_LOG_SECRET: ${{ secrets.ERR_LOG_SECRET }} - TELEMETRY_URL: ${{ secrets.TELEMETRY_URL }} - run: | - echo $ERR_LOG_KEY > log_creds.txt - echo $ERR_LOG_SECRET >> log_creds.txt - echo $ERR_LOG_URL >> log_creds.txt - echo $TELEMETRY_URL >> log_creds.txt - - - name: Run build - env: - WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} - WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: yarn build --win --publish always + yarn build ${{ matrix.opt }} --publish always - name: Tar files - run: tar -cvf dist-windows.tar dist_electron + run: tar -cvf dist.tar dist_electron - name: Upload Artifacts uses: actions/upload-artifact@v4 with: - name: dist-windows - path: dist-windows.tar + name: ${{ matrix.dist }} + path: dist.tar