-
Notifications
You must be signed in to change notification settings - Fork 213
97 lines (85 loc) · 2.55 KB
/
build-windows-packages.yml
File metadata and controls
97 lines (85 loc) · 2.55 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
name: "Build Windows Packages"
run-name: "Build Windows Packages for ${{ inputs.ref }}"
on:
workflow_call:
inputs:
version:
description: "The version being built"
type: string
required: true
ref:
description: "The git reference to build"
type: string
required: true
upload_release_assets:
description: "Whether to upload assets to a GitHub release"
type: boolean
default: false
jobs:
build:
name: "Build DLL"
runs-on: ${{ matrix.os }}
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
os: [ "windows-2022" ]
# Note: keep this in sync with the Windows matrix in tests.yml
php-version:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
- "8.5"
ts: [ ts, nts ]
steps:
- uses: actions/checkout@v6
with:
submodules: true
ref: ${{ inputs.ref }}
- name: "Build Driver"
id: build-driver
uses: ./.github/actions/windows/build
with:
php-version: ${{ matrix.php-version }}
ts: ${{ matrix.ts }}
run-tests: false
sign-and-upload:
environment: release
name: "Sign and create package"
needs: build
runs-on: "ubuntu-latest"
permissions:
id-token: write
steps:
- name: "Generate token and checkout repository"
uses: mongodb-labs/drivers-github-tools/secure-checkout@v3
with:
app_id: ${{ vars.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
ref: ${{ inputs.ref }}
- name: "Set up drivers-github-tools"
uses: mongodb-labs/drivers-github-tools/setup@v3
with:
aws_role_arn: ${{ secrets.AWS_ROLE_ARN }}
aws_region_name: ${{ vars.AWS_REGION_NAME }}
aws_secret_id: ${{ secrets.AWS_SECRET_ID }}
- name: Get artifacts
uses: actions/download-artifact@v8
with:
path: artifacts
pattern: php_mongodb-*.zip
merge-multiple: true
- name: "Create detached signatures for packages"
uses: mongodb-labs/drivers-github-tools/gpg-sign@v3
with:
filenames: artifacts/php_mongodb*.zip
- name: "Move signatures from release assets folder"
run: |
mv ${RELEASE_ASSETS}/php_mongodb*.sig artifacts/
- name: "Upload assets to release"
if: ${{ inputs.upload_release_assets }}
run: |
gh release upload ${{ inputs.version }} artifacts/php_mongodb* --clobber