Skip to content

Commit efd1145

Browse files
James Courtier-DuttonJames Courtier-Dutton
authored andcommitted
Add manual actions.
1 parent 134b1e5 commit efd1145

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

.github/workflows/manual1.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Manual Build Windows/x64
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
manualbranch:
7+
description: 'Enter branch'
8+
required: true
9+
default: 'main'
10+
11+
jobs:
12+
build:
13+
runs-on: windows-latest
14+
15+
steps:
16+
- name: Checkout Repository with Submodules
17+
uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.event.inputs.manualbranch }}
20+
submodules: recursive
21+
22+
- name: Create Build Directory
23+
run: mkdir _build
24+
25+
- name: Configure with CMake
26+
shell: pwsh
27+
run: |
28+
cd _build
29+
& cmake -A x64 -T ClangCL ..
30+
31+
- name: Build with CMake
32+
shell: pwsh
33+
run: |
34+
cd _build
35+
& cmake --build . --config RelWithDebInfo --parallel
36+
37+
- name: Upload Build Artifacts
38+
id: upload-build-artifacts
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: ectool
42+
path: |
43+
_build/src/RelWithDebInfo/ectool.exe
44+
_build/src/RelWithDebInfo/ectool.pdb
45+
46+
- name: Create Release
47+
id: create_release
48+
uses: actions/create-release@v1
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
with:
52+
tag_name: ${{ github.ref_name }}
53+
release_name: Release ${{ github.ref_name }}
54+
draft: false
55+
prerelease: false
56+
57+
- name: Upload Release Asset
58+
id: upload-release-asset
59+
uses: actions/upload-release-asset@v1
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
with:
63+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
64+
asset_path: |
65+
_build/src/RelWithDebInfo/ectool.exe
66+
_build/src/RelWithDebInfo/ectool.pdb
67+
asset_name: ectool-windows-amd64-${{ github.event.inputs.manualbranch }}.zip
68+
asset_content_type: application/zip
69+
70+

0 commit comments

Comments
 (0)