-
Notifications
You must be signed in to change notification settings - Fork 112
141 lines (125 loc) · 4.92 KB
/
Copy pathdistro-release.yml
File metadata and controls
141 lines (125 loc) · 4.92 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Windows Release by Tag
on:
workflow_dispatch:
inputs:
release_tag:
description: 'Tag to build Windows Release from'
required: true
permissions:
contents: write
id-token: write # This is required for requesting the JWT (windows-build-test)
actions: read # This is required for wait-for-job (windows-build-test)
jobs:
config:
runs-on: ubuntu-latest
env:
vs19_vcpkg_version: "2024.10.21"
vs22_vcpkg_version: "2026.06.01"
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: Checkout matrix file
uses: actions/checkout@v7
with:
sparse-checkout: .github/workflows/matrix/windows-finalize-release-config.json
sparse-checkout-cone-mode: false
- 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"
# Derive vcpkg-version from the compiler: msvc-2019 entries use the
# VS2019 vcpkg baseline, everything else the VS2022 one.
jq \
--arg vs19 "${{ env.vs19_vcpkg_version }}" \
--arg vs22 "${{ env.vs22_vcpkg_version }}" \
'.include[] |= (. + {"vcpkg-version": (if .cxx_compiler == "msvc-2019" then $vs19 else $vs22 end)})' \
"$MATRIX_FILE" > tmp.json
echo "matrix=$(jq -c . tmp.json)" >> $GITHUB_OUTPUT
generate-c-bindings:
needs: config
uses: ./.github/workflows/generate-c-bindings.yml
with:
docker_image_tag: 'latest' # hardcode latest for now TODO: provide correct tag later
version_tag: ${{ needs.config.outputs.release_tag }}
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 }}
vs22_vcpkg_version: ${{ needs.config.outputs.vs22_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@v7
- 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
case "$PKG_FILE" in
# Keep the historical layout for the iterator-debug archive:
# MeshLibDist-IteratorDebug.zip -> MeshLibDist_<version>-IteratorDebug.zip
*-IteratorDebug.zip) mv "$PKG_FILE" "${PKG_FILE/Dist/Dist_${{ needs.config.outputs.app_version }}}" ;;
# Per-VS archives: MeshLibDistVS19.zip -> MeshLibDistVS19_<version>.zip
*) mv "$PKG_FILE" "${PKG_FILE%.zip}_${{ needs.config.outputs.app_version }}.zip" ;;
esac
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: ubuntu-latest
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