Skip to content

Commit

Permalink
[ci] update workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
gipert committed Feb 28, 2024
1 parent 6442a93 commit cb69806
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 25 deletions.
49 changes: 27 additions & 22 deletions .github/workflows/distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,47 @@ name: distribute

on:
workflow_dispatch:
pull_request:
push:
tags: "v*"
branches:
- main
release:
types:
- published

jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
FORCE_COLOR: 3

jobs:
dist:
name: Distribution build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build SDist and wheel
run: pipx run build

- uses: actions/upload-artifact@v4
with:
path: dist/*
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check metadata
run: pipx run twine check dist/*
- uses: hynek/build-and-inspect-python-package@v2

publish:
needs: [dist]
name: Publish to PyPI
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist

- uses: pypa/[email protected]
with:
password: ${{ secrets.pypi_password }}
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'release' && github.event.action == 'published'
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: daq2lh5

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- 'releases/**'
pull_request:
release:
- "releases/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down

0 comments on commit cb69806

Please sign in to comment.