GitHub Release #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub Release | |
on: | |
workflow_dispatch: | |
push: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
uses: ./.github/workflows/python-package.yml | |
release: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download executable | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifact | |
- name: Compress Directories | |
run: | | |
cd artifact | |
for dir in */; do | |
dir_name=$(basename "$dir") | |
zip_file_name="${dir_name}-$(basename ${{ github.ref }}).zip" | |
zip -r "${zip_file_name}" "${dir}" | |
done | |
cd .. | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
body_path: CHANGELOG.md | |
files: artifact/*.zip | |
prerelease: contains(github.ref, 'beta') |