diff --git a/.github/source-code.sh b/.github/source-code.sh index 0c033fc..3d73c3d 100755 --- a/.github/source-code.sh +++ b/.github/source-code.sh @@ -9,7 +9,7 @@ cmd="${1}" ; shift cmd_pack="pack" cmd_upload="upload" -archives=( "${ASSET_BASENAME}-source-code"{.zip,.tar.gz} ) +archives=( "${ASSET_BASENAME}-source-code"{.zip,.tgz} ) for archive in "${archives[@]}" ; do case "${cmd}" in @@ -17,7 +17,7 @@ for archive in "${archives[@]}" ; do pipx run git-archive-all --verbose "${archive}" | grep -v "/3rd/" ;; "${cmd_upload}" ) - label="Source code - complete (${archive#*.})" + label="Source code - complete (.${archive##*.})" gh release upload --clobber "${GH_TAG}" "${archive}#${label}" ;; * ) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 218e0bd..cae9bd9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,7 +54,10 @@ jobs: binaries: needs: [ draft ] - strategy: { matrix: { os: [ ubuntu-latest, macos-13, macos-latest ] } } + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, macos-13, macos-latest, ] runs-on: ${{ matrix.os }} defaults: run: @@ -65,10 +68,14 @@ jobs: submodules: true - id: setup + shell: python run: | - platform="$(uname -s)" - arch="$(uname -m)" - echo "basename=${ASSET_BASENAME}-${platform,,}-${arch,,}" >> $GITHUB_OUTPUT + from os import getenv + from platform import machine, system + from pathlib import Path + basename = f"{getenv('ASSET_BASENAME')}-{system().lower()}-{machine().lower()}" + output_path = Path(getenv('GITHUB_OUTPUT')).write_text(f"basename={basename}\n") + - run: pipx install -- meson ninja - run: meson setup --reconfigure --buildtype=release -- build - run: meson compile --jobs 4 --verbose -C build @@ -76,7 +83,7 @@ jobs: env: { BASENAME: "${{ steps.setup.outputs.basename }}", } - run: zip -r "${BASENAME}.zip" "build/${BASENAME}" env: { BASENAME: "${{ steps.setup.outputs.basename }}", } - - run: release upload --clobber "${GH_TAG}" "${BASENAME}.zip" + - run: gh release upload --clobber "${GH_TAG}" "${BASENAME}.zip" env: BASENAME: "${{ steps.setup.outputs.basename }}" GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"