-
Notifications
You must be signed in to change notification settings - Fork 111
120 lines (106 loc) · 3.87 KB
/
Copy pathdistro-release.yml
File metadata and controls
120 lines (106 loc) · 3.87 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
119
name: Windows Release by Tag
on:
workflow_dispatch:
inputs:
release_tag:
description: 'Tag to build Windows Release from'
required: true
permissions:
contents: write
jobs:
config:
runs-on: aws-micro
env:
vs19_vcpkg_version: "2024.10.21"
vs22_vcpkg_version: "2026.03.18"
outputs:
app_version: ${{ steps.set.outputs.app_version }}
release_tag: ${{ steps.set.outputs.release_tag }}
windows_x64_config_matrix: ${{ steps.set.outputs.matrix }}
full_config_build: "false"
internal_build: "false"
upload_test_artifacts: "false"
nuget_build: "false"
vs19_vcpkg_version: ${{ env.vs19_vcpkg_version }}
vs22_vcpkg_version: ${{ env.vs22_vcpkg_version }}
steps:
- name: Set release config
id: set
run: |
TAG="${{ github.event.inputs.release_tag || github.ref_name }}"
APP_VERSION="${TAG}"
echo "app_version=$APP_VERSION" >> $GITHUB_OUTPUT
echo "release_tag=$TAG" >> $GITHUB_OUTPUT
# Minimal matrix: Release only
MATRIX_FILE=".github/workflows/matrix/windows-finalize-release-config.json"
MATRIX=$(jq -c . < "$MATRIX_FILE")
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
jq \
--arg vs19 "${{ env.vs19_vcpkg_version }}" \
--arg vs22 "${{ env.vs22_vcpkg_version }}" \
'(.include[] | select(.["vcpkg-version"]=="__VCPKG_VERSION_VS19__") | .["vcpkg-version"]) = $vs19
| (.include[] | select(.["vcpkg-version"]=="__VCPKG_VERSION_VS22__") | .["vcpkg-version"]) = $vs22' \
"$MATRIX_FILE" > tmp.json
echo "matrix=$(jq -c . tmp.json)" >> $GITHUB_OUTPUT
windows-build-test:
needs: [ config ]
uses: ./.github/workflows/build-test-windows.yml
with:
config_matrix: ${{ needs.config.outputs.windows_x64_config_matrix }}
full_config_build: ${{ needs.config.outputs.full_config_build == 'true' }}
internal_build: ${{ needs.config.outputs.internal_build == 'true' }}
upload_artifacts: true
upload_test_artifacts: ${{ needs.config.outputs.upload_test_artifacts == 'true' }}
nuget_build: ${{ needs.config.outputs.nuget_build == 'true' }}
secrets: inherit
update-win-version:
needs:
- config
- windows-build-test
uses: ./.github/workflows/update-win-version.yml
with:
vs19_vcpkg_version: ${{ needs.config.outputs.vs19_vcpkg_version }}
app_version: ${{ needs.config.outputs.app_version }}
secrets: inherit
upload-distributions:
if: ${{ !cancelled() }}
timeout-minutes: 10
runs-on: ubuntu-latest
needs:
- config
- update-win-version
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Download All Developer Distributives
uses: actions/download-artifact@v8
with:
pattern: Distributives*
merge-multiple: true
- name: Rename Distributives
run: |
shopt -s nullglob
for PKG_FILE in MeshLibDist*.zip ; do
mv "$PKG_FILE" "${PKG_FILE/Dist/Dist_${{ needs.config.outputs.app_version }}}"
done
- name: Upload Distributives
env:
GH_TOKEN: ${{ github.token }}
run: |
shopt -s nullglob
PKG_FILES="MeshLibDist*.zip meshlib_*.zip meshlib_*.tar.xz"
if [ -n "$(echo $PKG_FILES)" ] ; then
gh release upload ${{ needs.config.outputs.release_tag }} $PKG_FILES --clobber
fi
update-artifacts:
timeout-minutes: 15
runs-on: aws-micro
needs: upload-distributions
if: always()
steps:
# all distribution
- name: Delete All MeshInspector Distribution Files
uses: geekyeggo/delete-artifact@176a747ab7e287e3ff4787bf8a148716375ca118 # v6.0.0
with:
name: Distributives*
failOnError: false