Skip to content

Commit

Permalink
chore: pdls
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilb committed Sep 24, 2024
1 parent e257fdd commit d4d5849
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
# we want to publish on "push to master" only. When we don't want to publish, we want to upload artefacts
SHOULD_PUBLISH: ${{ github.event_name == 'push' && github.ref == 'master' }}

jobs:
build_linux:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -55,20 +59,20 @@ jobs:

- name: Build but do not publish ${{ matrix.pkg_to_build }}
# we want this to run always, except on "push" to "master"
if: github.event_name != 'push' || github.ref != 'master'
if: !env.SHOULD_PUBLISH
run: |
sed -i 's/"target": \["deb"\]/"target": "${{ matrix.pkg_to_build }}"/g' package.json && yarn build-release
- name: Upload artefacts ${{ matrix.pkg_to_build }}
# we want this to run always, except on "push" to "master"
if: github.event_name != 'push' || github.ref != 'master'
if: !env.SHOULD_PUBLISH
uses: ./actions/upload_prod_artefacts
with:
upload_prefix: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.pkg_to_build }}-others

- name: Build & publish ${{ matrix.pkg_to_build }}
# we want this to run only when on "push" to "master"
if: github.ref == 'master' && github.event_name == 'push'
if: env.SHOULD_PUBLISH
run: |
sed -i 's/\"target\": \\[\"deb\"\\]/\"target\": \"${{ matrix.pkg_to_build }}\"/g' package.json; yarn build-release-publish
Expand All @@ -91,19 +95,19 @@ jobs:

- 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'
if: !env.SHOULD_PUBLISH
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'
if: !env.SHOULD_PUBLISH
uses: ./actions/upload_prod_artefacts
with:
upload_prefix: ${{ runner.os }}-${{ runner.arch }}

- name: Build & publish
# we want this to run only when on "push" to "master"
if: github.ref == 'master' && github.event_name == 'push'
if: env.SHOULD_PUBLISH
run: yarn build-release-publish # No other args needed for windows publish

# We want a mac arm64 build, and according to this https://github.com/actions/runner-images#available-images macos-14 is always arm64
Expand Down Expand Up @@ -132,21 +136,21 @@ jobs:

- 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'
if: !env.SHOULD_PUBLISH
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'
if: !env.SHOULD_PUBLISH
uses: ./actions/upload_prod_artefacts
with:
upload_prefix: ${{ runner.os }}-${{ runner.arch }}

- name: Build & publish
# we want this to run only when on "push" to "master"
if: github.ref == 'master' && github.event_name == 'push'
if: env.SHOULD_PUBLISH
run: |
source ./build/setup-mac-certificate.sh
build-release-publish --config.mac.bundleVersion=${{ github.ref }}
2 changes: 1 addition & 1 deletion ts/test/session/unit/updater/updater_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('Updater', () => {
// the CI for building release relies on this being set to build the different targets.
if (!content || isEmpty(content) || !content.includes('"target": ["deb"],')) {
throw new Error(
'Content empty or does not contain the target on a single line. They have to be for the linux appImage build to pass.'
'Content empty or does not contain the target on a single line. They have to be for the linux CI builds to pass.'
);
}
});
Expand Down

0 comments on commit d4d5849

Please sign in to comment.