-
Notifications
You must be signed in to change notification settings - Fork 2k
88 lines (80 loc) · 2.88 KB
/
release-recurring.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Release Recurring
# This workflow bakes executables of the major platforms for Testing purposes
on:
merge_group:
workflow_dispatch:
push:
branches:
- develop
pull_request:
types:
- opened
- synchronize
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PR_NUMBER: ${{ github.event.number }}
jobs:
build-and-upload-artifacts:
timeout-minutes: 15
# Skip jobs for release PRs
# windows on recurring should be portable
if: ${{ !startsWith(github.head_ref, 'release/') }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: "macos-latest"
build-targets: "zip"
- os: "windows-latest"
build-targets: "portable"
- os: "ubuntu-latest"
build-targets: "tar.gz"
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install packages
run: npm ci
- name: Bump version
shell: bash
run: npm --workspaces version prerelease --preid="$(git rev-parse --short HEAD)${{ github.event_name == 'pull_request' && '.pr-$PR_NUMBER' || '' }}" --no-git-tag-version
- name: Package
shell: bash
run: NODE_OPTIONS='--max_old_space_size=6144' BUILD_TARGETS='${{ matrix.build-targets }}' npm run app-package
# - name: Set publish metadata # Checksum for provenance must be calculated before moving artifacts temporarily
# id: metadata
# run: |
# INSO_VERSION=$(jq .version packages/insomnia-inso/package.json -rj)
# echo "INSO_VERSION=${INSO_VERSION}" >> $GITHUB_ENV
# ./.github/scripts/generate-binary-digest.sh
# env:
# ARTIFACT_PATH: "packages"
# CLI_ARTIFACT_SHAFILE: ${{runner.temp}}/cli.sha256
# ELECTRON_ARTIFACT_SHAFILE: ${{runner.temp}}/electron.sha256
- name: Test critical path on packaged electron app
run: npm run test:package -w packages/insomnia-smoke-test -- --project=Critical
env:
INSOMNIA_UPDATES_URL: http://localhost:4010
- name: Upload smoke test traces
uses: actions/upload-artifact@v4
with:
if-no-files-found: ignore
name: ${{ matrix.os }}-package-critical-test-traces-${{ github.run_number }}
path: packages/insomnia-smoke-test/traces
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: ignore
name: ${{ matrix.os }}-artifacts-${{ github.run_number }}
path: |
packages/insomnia/dist/*.exe
packages/insomnia/dist/*.tar.gz
packages/insomnia/dist/*.zip