chore: improve CI workflow speed and usage
parent
0ef9a0e2c6
commit
f2b12469f3
@ -1,64 +0,0 @@
|
||||
name: 'Build Only (no publish)'
|
||||
description: 'Build only (no publish)'
|
||||
inputs:
|
||||
MAC_CERTIFICATE:
|
||||
description: 'MAC_CERTIFICATE (mac build only)'
|
||||
required: true
|
||||
MAC_CERTIFICATE_PASSWORD:
|
||||
description: 'MAC_CERTIFICATE_PASSWORD (mac build only)'
|
||||
required: true
|
||||
SIGNING_APPLE_ID:
|
||||
description: 'SIGNING_APPLE_ID (mac build only)'
|
||||
required: true
|
||||
SIGNING_APP_PASSWORD:
|
||||
description: 'SIGNING_APP_PASSWORD (mac build only)'
|
||||
required: true
|
||||
SIGNING_TEAM_ID:
|
||||
description: 'SIGNING_TEAM_ID (mac build only)'
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Build windows production binaries
|
||||
shell: bash
|
||||
if: runner.os == 'Windows'
|
||||
run: $(yarn bin)/electron-builder --config.extraMetadata.environment=%SIGNAL_ENV% --publish=never --config.directories.output=release
|
||||
|
||||
- name: Build mac production binaries
|
||||
shell: bash
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
source ./build/setup-mac-certificate.sh
|
||||
$(yarn bin)/electron-builder --config.extraMetadata.environment=$SIGNAL_ENV --config.mac.bundleVersion=${{ github.ref }} --publish=never --config.directories.output=release
|
||||
env:
|
||||
MAC_CERTIFICATE: ${{ inputs.MAC_CERTIFICATE }}
|
||||
MAC_CERTIFICATE_PASSWORD: ${{ inputs.MAC_CERTIFICATE_PASSWORD }}
|
||||
SIGNING_APPLE_ID: ${{ inputs.SIGNING_APPLE_ID }}
|
||||
SIGNING_APP_PASSWORD: ${{ inputs.SIGNING_APP_PASSWORD }}
|
||||
SIGNING_TEAM_ID: ${{ inputs.SIGNING_TEAM_ID }}
|
||||
|
||||
- name: Build linux production binaries
|
||||
shell: bash
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get install -y rpm
|
||||
yarn build-release
|
||||
|
||||
- name: Remove unpacked files
|
||||
run: |
|
||||
ls -d -- */ | xargs -I{} echo "Removing {}"
|
||||
ls -d -- */ | xargs -I{} rm -rf {}
|
||||
shell: bash
|
||||
working-directory: ./release/
|
||||
|
||||
- name: Remaining files
|
||||
run: ls .
|
||||
shell: bash
|
||||
working-directory: ./release/
|
||||
|
||||
- name: Upload Production Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ runner.os }}-${{ runner.arch }}-production
|
||||
path: release
|
@ -1,29 +0,0 @@
|
||||
name: 'Build & Publish'
|
||||
description: 'Build & Publish'
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Build & publish windows production binaries
|
||||
shell: bash
|
||||
if: runner.os == 'Windows' && github.ref == 'master' && github.event_name == 'push'
|
||||
run: $(yarn bin)/electron-builder --config.extraMetadata.environment=%SIGNAL_ENV% --publish=always
|
||||
|
||||
- name: Build & publish mac production binaries
|
||||
shell: bash
|
||||
if: runner.os == 'macOS' && github.ref == 'master' && github.event_name == 'push'
|
||||
run: |
|
||||
source ./build/setup-mac-certificate.sh
|
||||
$(yarn bin)/electron-builder --config.extraMetadata.environment=$SIGNAL_ENV --config.mac.bundleVersion=${{ github.ref }} --publish=always
|
||||
env:
|
||||
MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE }}
|
||||
MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}
|
||||
SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID }}
|
||||
SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD }}
|
||||
SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }}
|
||||
|
||||
- name: Build & publish linux production binaries
|
||||
shell: bash
|
||||
if: runner.os == 'Linux' && github.ref == 'master' && github.event_name == 'push'
|
||||
run: |
|
||||
sudo apt-get install -y rpm
|
||||
yarn build-release-publish
|
@ -0,0 +1,27 @@
|
||||
name: 'Upload production artefact (not publish)'
|
||||
description: 'Upload production artefact (not publish)'
|
||||
inputs:
|
||||
upload_prefix:
|
||||
description: 'upload name prefix'
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Remove unpacked files
|
||||
run: |
|
||||
ls -d -- */ | xargs -I{} echo "Removing {}"
|
||||
ls -d -- */ | xargs -I{} rm -rf {}
|
||||
shell: bash
|
||||
working-directory: ./release/
|
||||
|
||||
- name: Remaining files
|
||||
run: ls .
|
||||
shell: bash
|
||||
working-directory: ./release/
|
||||
|
||||
- name: Upload Production Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.upload_prefix }}-production
|
||||
path: release
|
Loading…
Reference in New Issue