-
Notifications
You must be signed in to change notification settings - Fork 1
118 lines (104 loc) · 3.6 KB
/
Copy pathomnicode-desktop-release.yml
File metadata and controls
118 lines (104 loc) · 3.6 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: OmniCode Desktop Release
on:
push:
tags:
- 'omnicode-v*'
workflow_dispatch:
inputs:
release_tag:
description: 'Release tag to publish, for example omnicode-v1.121.0'
required: true
type: string
prerelease:
description: 'Mark the GitHub release as a prerelease'
required: false
default: false
type: boolean
permissions:
contents: write
concurrency:
group: omnicode-release-${{ github.ref_name || inputs.release_tag }}
cancel-in-progress: false
jobs:
build:
name: Build ${{ matrix.label }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- label: macOS x64
os: macos-13
archive_name: OmniCode-darwin-x64.zip
build_command: npm run gulp vscode-darwin-x64-min-ci
package_command: |
mkdir -p release
ditto -c -k --sequesterRsrc --keepParent "../VSCode-darwin-x64" "release/OmniCode-darwin-x64.zip"
- label: macOS arm64
os: macos-14
archive_name: OmniCode-darwin-arm64.zip
build_command: npm run gulp vscode-darwin-arm64-min-ci
package_command: |
mkdir -p release
ditto -c -k --sequesterRsrc --keepParent "../VSCode-darwin-arm64" "release/OmniCode-darwin-arm64.zip"
- label: Linux x64
os: ubuntu-22.04
archive_name: OmniCode-linux-x64.tar.gz
build_command: npm run gulp vscode-linux-x64-min-ci
package_command: |
mkdir -p release
tar -czf "release/OmniCode-linux-x64.tar.gz" -C .. "VSCode-linux-x64"
- label: Windows x64
os: windows-2022
archive_name: OmniCode-win32-x64.zip
build_command: npm run gulp vscode-win32-x64-min-ci
package_command_windows: |
New-Item -ItemType Directory -Force -Path release | Out-Null
if (Test-Path ".build/win32-x64/VSCode-win32-x64.zip") {
Copy-Item ".build/win32-x64/VSCode-win32-x64.zip" "release/OmniCode-win32-x64.zip"
} else {
Compress-Archive -Path "..\VSCode-win32-x64\*" -DestinationPath "release/OmniCode-win32-x64.zip"
}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Build desktop package
run: ${{ matrix.build_command }}
- name: Package release artifact
if: runner.os != 'Windows'
shell: bash
run: ${{ matrix.package_command }}
- name: Package release artifact (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: ${{ matrix.package_command_windows }}
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.archive_name }}
path: release/${{ matrix.archive_name }}
if-no-files-found: error
release:
name: Publish GitHub Release
runs-on: ubuntu-22.04
needs: build
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Publish release
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ github.ref_name || inputs.release_tag }}
prerelease: ${{ inputs.prerelease || false }}
generate_release_notes: true
files: dist/*