chore: test different jobs #3389
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Session Desktop | ||
on: | ||
push: | ||
branches: | ||
- clearnet | ||
- unstable | ||
- 'release/**' | ||
- 'ci/**' | ||
pull_request: | ||
branches: | ||
- clearnet | ||
- unstable | ||
- 'release/**' | ||
- 'ci/**' | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
build_linux_non_appimage: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- run: git config --global core.autocrlf false | ||
- name: Checkout git repo | ||
uses: actions/checkout@v3 | ||
- name: Setup & Build | ||
uses: ./actions/setup_and_build | ||
- name: Build but do not publish (all but appImage) | ||
# we want this to run always, except on "push" to "master" | ||
if: github.event_name != 'push' || github.ref != 'master' | ||
run: yarn sedtoDeb; yarn build-release | ||
- name: Upload artefacts (all but appImage) | ||
# we want this to run always, except on "push" to "master" | ||
if: github.event_name != 'push' || github.ref != 'master' | ||
uses: ./actions/upload_prod_artefacts | ||
- name: Build & publish (all but appImage) | ||
# we want this to run only when on "push" to "master" | ||
if: github.ref == 'master' && github.event_name == 'push' | ||
run: yarn sedtoDeb; yarn build-release-publish | ||
build_linux_appimage_only: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- run: git config --global core.autocrlf false | ||
- name: Checkout git repo | ||
uses: actions/checkout@v3 | ||
- name: Setup & Build | ||
uses: ./actions/setup_and_build | ||
- name: Lint Files | ||
# no need to lint files on all platforms | ||
run: yarn lint-full | ||
- name: Enforce yarn.lock has no duplicates | ||
# no need to dedup yarn.lock on all platforms | ||
uses: ./actions/deduplicate_fail | ||
# we want to test on all platforms are some are testing the menus rendered (and are depent on the platform) | ||
- name: Unit Test | ||
run: yarn test | ||
- name: Build but do not publish (only appImage) | ||
# we want this to run always, except on "push" to "master" | ||
if: github.event_name != 'push' || github.ref != 'master' | ||
run: yarn sedtoAppImage; yarn build-release | ||
- name: Upload artefacts (only appImage) | ||
# we want this to run always, except on "push" to "master" | ||
if: github.event_name != 'push' || github.ref != 'master' | ||
uses: ./actions/upload_prod_artefacts | ||
- name: Build & publish (only appImage) | ||
# we want this to run only when on "push" to "master" | ||
if: github.ref == 'master' && github.event_name == 'push' | ||
run: yarn sedtoAppImage; yarn build-release-publish | ||
build_windows: | ||
runs-on: windows-2022 | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- run: git config --global core.autocrlf false | ||
- name: Checkout git repo | ||
uses: actions/checkout@v3 | ||
- name: Setup & Build | ||
uses: ./actions/setup_and_build | ||
# we want to test on all platforms are some are testing the menus rendered (and are depent on the platform) | ||
- name: Unit Test | ||
run: yarn test | ||
- name: Build but do not publish | ||
# we want this to run always, except on "push" to "master" | ||
if: github.event_name != 'push' || github.ref != 'master' | ||
run: yarn build-release | ||
- name: Upload artefacts | ||
# we want this to run always, except on "push" to "master" | ||
if: github.event_name != 'push' || github.ref != 'master' | ||
uses: ./actions/upload_prod_artefacts | ||
- name: Build & publish | ||
# we want this to run only when on "push" to "master" | ||
if: github.ref == 'master' && github.event_name == 'push' | ||
run: $(yarn bin)/electron-builder --config.extraMetadata.environment=production --publish=always | ||
# We want a mac arm64 build, and according to this https://github.com/actions/runner-images#available-images macos-14 is always arm64 | ||
# macos-14 is disabled for now as we hit our free tier limit for macos builds | ||
build_macos_x64: | ||
runs-on: macos-12 | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
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 }} | ||
steps: | ||
- run: git config --global core.autocrlf false | ||
- name: Checkout git repo | ||
uses: actions/checkout@v3 | ||
- name: Setup & Build | ||
uses: ./actions/setup_and_build | ||
# we want to test on all platforms are some are testing the menus rendered (and are depent on the platform) | ||
- name: Unit Test | ||
run: yarn test | ||
- name: Build but do not publish | ||
# we want this to run always, except on "push" to "master" | ||
if: github.event_name != 'push' || github.ref != 'master' | ||
run: | | ||
source ./build/setup-mac-certificate.sh | ||
yarn build-release --config.mac.bundleVersion=${{ github.ref }} | ||
- name: Upload artefacts | ||
# we want this to run always, except on "push" to "master" | ||
if: github.event_name != 'push' || github.ref != 'master' | ||
uses: ./actions/upload_prod_artefacts | ||
- name: Build & publish | ||
# we want this to run only when on "push" to "master" | ||
if: github.ref == 'master' && github.event_name == 'push' | ||
run: | | ||
source ./build/setup-mac-certificate.sh | ||
$(yarn bin)/electron-builder --config.extraMetadata.environment=production --config.mac.bundleVersion=${{ github.ref }} --publish=always |