Skip to content

Expose public url for files on demand (#139) #5

Expose public url for files on demand (#139)

Expose public url for files on demand (#139) #5

Workflow file for this run

# This workflow automatically creates a GitHub release for the project on successful version update
name: Create a GitHub release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: built-binary
- name: Check Version
uses: nowsprinting/check-version-format-action@v4
id: version
with:
prefix: 'v'
- name: Check for Pre-release
uses: haya14busa/action-cond@v1
id: is_prerelease
with:
cond: ${{ steps.version.outputs.prerelease != '' }}
if_true: true
if_false: false
- name: Get Newest Changelog
run: |
python -c "import re; from pathlib import Path; text=re.sub('<!--(.*?)-->', '', (Path.cwd() / 'CHANGELOG.md').read_text(), flags=re.DOTALL); start=text.find('_' * 79); (Path.cwd() / 'TEMP_CHANGELOG.md').write_text(text[start:text.find('_' * 79, start+1)])"
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
name: Release ${{ github.ref_name }}
draft: false
prerelease: ${{ steps.is_prerelease.outputs.value }}
body_path: ./TEMP_CHANGELOG.md
files: |
*.whl
*.tar.gz