Skip to content

Release

Release #5

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
build:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.20"
enable-cache: true
- name: Build
run: |
uv build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: swap-env
path: dist/*
if-no-files-found: error
overwrite: true
release:
name: Create GitHub release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: swap-env
path: dist
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: dist/*
publish:
name: Publish to PyPI
needs: build
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.20"
enable-cache: true
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: swap-env
path: dist
- name: Publish to PyPI
run: |
uv publish