Skip to content

release: v0.1.0 (#10) #1

release: v0.1.0 (#10)

release: v0.1.0 (#10) #1

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: read
jobs:
build:
name: Build wheel + sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install build
run: python -m pip install --upgrade pip build
- name: Build distribution
run: python -m build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
publish:
name: Publish to PyPI (Trusted Publishing)
needs: build
runs-on: ubuntu-latest
# Trusted Publishing requires id-token: write. Configured on PyPI at
# https://pypi.org/manage/project/yc-ai-pulse/settings/publishing/
# against this repo + this workflow filename.
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/p/yc-ai-pulse
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
github-release:
name: Attach artifacts to GitHub release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Upload to GitHub release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ github.ref_name }}
REPO: ${{ github.repository }}
run: |
gh release upload "$TAG_NAME" dist/* --repo "$REPO" --clobber