-
Notifications
You must be signed in to change notification settings - Fork 4
118 lines (100 loc) · 3.08 KB
/
release_generation.yml
File metadata and controls
118 lines (100 loc) · 3.08 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: Release Generator
on:
workflow_run:
workflows: ["Release"]
types:
- completed
workflow_dispatch:
permissions:
contents: write
jobs:
build_dmg:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Build DMG
run: |
chmod +x build_scripts/openai/macos_build.sh
./build_scripts/openai/macos_build.sh
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: gpt-computer-agent-openai-dmg
path: dist/*.dmg
build_exe:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Build EXE
run: |
sh build_scripts/openai/windows_build.sh
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: gpt-computer-agent-openai-exe
path: dist/*.exe
release:
needs: [build_dmg, build_exe]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Getting Tag
id: tag_extractor
run: echo "latest_tag=$(git describe --tags --abbrev=0)" >> "$GITHUB_OUTPUT"
- uses: ncipollo/release-action@v1
id: create_release
with:
name: GPT Computer Assistant ${{ steps.tag_extractor.outputs.latest_tag }}
generateReleaseNotes: true
tag: ${{ steps.tag_extractor.outputs.latest_tag }}
- name: Download DMG Artifact
uses: actions/download-artifact@v4.2.1
with:
name: gpt-computer-agent-openai-dmg
path: dist_dmg
- name: Download EXE Artifact
uses: actions/download-artifact@v4.2.1
with:
name: gpt-computer-agent-openai-exe
path: dist_exe
- name: List DMG Directory
run: ls -la dist_dmg
- name: List EXE Directory
run: ls -la dist_exe
- name: Upload DMG Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist_dmg/GPT_Computer_Agent.dmg
asset_name: gpt-computer-agent-openai.dmg
asset_content_type: application/octet-stream
- name: Upload EXE Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist_exe/GPT_Computer_Agent.exe
asset_name: gpt-computer-agent-openai.exe
asset_content_type: application/octet-stream