Skip to content

Feature: create github release on tag push #2

Feature: create github release on tag push

Feature: create github release on tag push #2

Workflow file for this run

name: Create a release from tag

Check failure on line 1 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

(Line: 19, Col: 9): Unexpected value 'persist-credentials'
permissions: {}
on:
push:
tags:
- '*'
jobs:
build:
name: Build and store python artifacts
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
persist-credentials: false
with:
persist-credentials: false
- uses: ./.github/actions/uv-setup/
- 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 }}