Skip to content

Feature: create github release on tag push #1

Feature: create github release on tag push

Feature: create github release on tag push #1

Workflow file for this run

name: Create a release from tag
permissions: {}
on:
push:
tags:
- 'v?[0-9]+(.[0-9]+)*(.[0-9a-zA-Z\-]+)?'
jobs:
build:
name: Build and store python artifacts
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: pip
- name: Install build tool
run: pip install --upgrade uv
- name: Build
run: uv build
- name: Store python distribution artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts
path: dist/
release:
permissions:
contents: write # allow creating a release
name: "Create and package a release"
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Retrieve distribution artifacts
uses: actions/download-artifact@v4
with:
name: artifacts
path: dist/
- name: Create release ${{ github.ref_name }}
shell: bash
run: |
gh release create ${{ github.ref_name }} --repo ${{ github.repository }} --generate-notes dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}