Skip to content

Instantly share code, notes, and snippets.

@superbrothers
Last active October 28, 2023 15:01
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save superbrothers/af84a2f8af394a62352e06537a640746 to your computer and use it in GitHub Desktop.
Save superbrothers/af84a2f8af394a62352e06537a640746 to your computer and use it in GitHub Desktop.
Create a GitHub Release and upload multiple assets in GitHub Actions
name: Release
on:
push:
tags: ["v*"]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
set -x
assets=()
for asset in ./*.md; do
assets+=("-a" "$asset")
done
tag_name="${GITHUB_REF##*/}"
hub release create "${assets[@]}" -m "$tag_name" "$tag_name"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment