-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (72 loc) · 2.31 KB
/
Copy pathmacos-package.yml
File metadata and controls
84 lines (72 loc) · 2.31 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
name: Build macOS Package
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
default: '0.0.0'
# push:
# branches:
# - main
# - release-build-testing
jobs:
build-macos-package:
runs-on: macos-latest
# We don't need a matrix strategy anymore as we're building both architectures in one job
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Build macOS binaries
run: |
chmod +x scripts/build_macos_binaries.sh
./scripts/build_macos_binaries.sh
- name: Build macOS package
run: |
chmod +x scripts/build_macos_package.sh
./scripts/build_macos_package.sh
- name: Upload macOS package
uses: actions/upload-artifact@v4
with:
name: BB-macOS-package
path: build/macos_package/BB-*.pkg
release:
needs: build-macos-package
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Get version
id: get_version
run: echo "VERSION=$(deno eval 'import { VERSION } from "./version.ts"; console.log(VERSION);')" >> $GITHUB_OUTPUT
- name: Download macOS package
uses: actions/download-artifact@v4
with:
name: BB-macOS-package
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.get_version.outputs.VERSION }}
release_name: Release v${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/macos_package/BB-${{ steps.get_version.outputs.VERSION }}.pkg
asset_name: BB-${{ steps.get_version.outputs.VERSION }}-universal.pkg
asset_content_type: application/octet-stream