Skip to content

Commit

Permalink
release: fix sourcode code upload label
Browse files Browse the repository at this point in the history
  • Loading branch information
rindeal authored Aug 9, 2024
1 parent d28b63a commit 881d28e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/source-code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ 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
"${cmd_pack}" )
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}"
;;
* )
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -65,18 +68,22 @@ 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
- run: meson install --destdir "${BASENAME}" -C build
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 }}"
Expand Down

0 comments on commit 881d28e

Please sign in to comment.