Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI
run-name: >
CI (${{ github.event_name }})
${{ github.event_name == 'pull_request' && format('PR#{0}', github.event.number) || '' }}
${{ github.event_name == 'workflow_dispatch' && inputs.ref || '' }}

on:
pull_request:
push:
branches: [ main ]
workflow_dispatch:
inputs:
ref:
type: string
description: Committish to checkout and run CI against

permissions: {}

jobs:
pre-commit:
uses: teemtee/tmt/.github/workflows/step-pre-commit.yml@main
with:
ref: ${{ inputs.ref }}

build-wheel:
uses: teemtee/tmt/.github/workflows/step-build-wheel.yml@main
with:
ref: ${{ inputs.ref }}
needs: [ pre-commit ]

doc-tests:
name: 📘 docs
uses: teemtee/tmt/.github/workflows/step-doc-tests.yml@main
with:
ref: ${{ inputs.ref }}
needs: [ pre-commit ]

overall-outcome:
name: GitHub Actions Overall Outcome
if: always()
needs: [ pre-commit, build-wheel, doc-tests ]
runs-on: ubuntu-slim
steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
14 changes: 0 additions & 14 deletions .github/workflows/pre-commit.yml

This file was deleted.

35 changes: 29 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,44 @@
name: 🚀 Release
run-name: 🚀 Release ${{ inputs.ref || github.ref_name }}

on:
release:
types: [published]
workflow_dispatch:
inputs:
ref:
type: string
description: 'Tag to release'
required: true

permissions: {}

jobs:
release:
name: 🚀 Release
build:
uses: teemtee/tmt/.github/workflows/step-build-wheel.yml@main
with:
ref: ${{ inputs.ref }}

deploy:
needs: [build]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/fmf
permissions:
id-token: write # For pypi-publish
id-token: write
attestations: write

steps:
- uses: actions/checkout@v6
- name: Build package
run: pipx run hatch build
- uses: actions/download-artifact@v8
with:
name: Packages
path: dist

- name: Generate artifact attestation for sdist and wheel
uses: actions/attest-build-provenance@v4
with:
subject-path: "dist/*"

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Loading