2323 outputs :
2424 tags : ${{ steps.get_tags.outputs.tags }}
2525 steps :
26+ - name : Checkout repository
27+ uses : actions/checkout@v4
2628 - name : Query mesa tags
2729 id : get_tags
2830 shell : bash
4042 else
4143 LATEST=$(gh release list --limit 1 --json tagName -q '.[0].tagName')
4244 if [[ -n "$LATEST" ]]; then
43- EXCLUDE_TAGS=$(gh release view "$LATEST" --json assets -q '.assets[].name' grep -o 'mesa-[0-9.]\+' | sort -V -u)
45+ EXCLUDE_TAGS=$(gh release view "$LATEST" --json assets -q '.assets[].name' | grep -o 'mesa-[0-9.]\+' | sort -V -u || echo "" )
4446 TAGS=$(comm -23 <(echo "$ALL_TAGS") <(echo "$EXCLUDE_TAGS"))
4547 else
4648 TAGS="$ALL_TAGS"
@@ -65,19 +67,19 @@ jobs:
6567 uses : ./.github/actions/compile
6668 with :
6769 mesa-tag : ${{ matrix.tag }}
68- - name : Upload artifact
69- uses : actions/upload-artifact@v4
70- with :
71- name : tinymesa-libs-${{ matrix.tag }}-${{ matrix.os }}
72- path : dist/
7370 - name : Stage artifacts
7471 shell : bash
7572 run : |
7673 mkdir dist
7774 BUILD_DIR="${{ github.workspace }}/mesa/build/src/tinymesa"
7875 find $BUILD_DIR -maxdepth 1 -type f -print0 | xargs -0 -n1 basename | while read -r f; do
79- mv "$BUILD_DIR/$f" "dist/${f/./-${{ matrix.tag }}-${{ runner.os }}-$(uname -m) .}"
76+ mv "$BUILD_DIR/$f" "dist/${f/./-${{ matrix.tag }}-${{ format('{0}-{1}', runner.os == 'macOS' && matrix.os || 'linux', runner.arch == 'X64' && 'amd64' || 'arm64') }} .}"
8077 done
78+ - name : Upload artifact
79+ uses : actions/upload-artifact@v4
80+ with :
81+ name : tinymesa-libs-${{ matrix.tag }}-${{ matrix.os }}
82+ path : dist/
8183 release :
8284 name : Release tinymesa
8385 runs-on : ubuntu-22.04
98100 shell : bash
99101 run : |
100102 TAG="tinymesa-${GITHUB_SHA::7}"
101- if gh release view "$TAG" >/dev/null 2>&1 ; then
103+ if gh release view "$TAG"; then
102104 gh release upload "$TAG" artifacts/*/* --clobber=false
103105 else
104- awk -f release.awk meson.build | gh release create "$TAG" artifacts/*/* --title "${{ matrix.tag }} " -F -
106+ awk -f release.awk meson.build | gh release create "$TAG" artifacts/*/* --title "$TAG " -F -
105107 fi
0 commit comments