Skip to content

Commit

Permalink
Revise other workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander committed May 23, 2024
1 parent b2f8aed commit 8482a93
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,19 @@ concurrency:
cancel-in-progress: true

on:
# Trigger on pull requests.
pull_request:

# Trigger on pushes to the mainline branches and version tags. This prevents building commits
# twice when the pull request source branch is in the same repository.
push:
branches:
- "trunk-patch"
- "trunk-minor"
- "trunk-major"
- "trunk-*"
tags:
- "v*"

# Trigger on request.
workflow_dispatch:

env:
UV_VERSION: 0.2.2

jobs:
build_wheels:
name: Build wheels [py${{ matrix.python_version }}, ${{ matrix.os }}]
Expand All @@ -34,14 +31,11 @@ jobs:
include:
- os_version: 'latest'

- os: 'macos'
os_version: '14'

steps:
- uses: actions/[email protected].4
- uses: actions/[email protected].6

- name: Build wheels
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v2.18.1
env:
CIBW_PROJECT_REQUIRES_PYTHON: "==${{ matrix.python_version }}.*"

Expand All @@ -59,17 +53,13 @@ jobs:
- uses: actions/[email protected]
name: Install Python
with:
python-version: '3.11'
python-version: '3.12'

- uses: actions/[email protected]
with:
path: ~/.cache/pip
key: gsd-build-wheels-pip-${{ hashFiles('.github/requirements-build-sdist.txt') }}
restore-keys: |
gsd-build-wheels-pip-
- name: Install uv
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/${{ env.UV_VERSION }}/uv-installer.sh | bash

- name: Install build
run: python3 -m pip --disable-pip-version-check install -r .github/requirements-build-sdist.txt --progress-bar=off
run: 'uv pip install -r .github/requirements-build-sdist.txt --only-binary :all: --system --reinstall'

- name: Build sdist
run: python -m build --sdist --outdir dist/ .
Expand Down
23 changes: 10 additions & 13 deletions .github/workflows/release.yml → .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,14 @@ concurrency:
cancel-in-progress: true

on:
# Trigger on pull requests.
pull_request:

# Trigger on pushes to the mainline branches and version tags. This prevents building commits
# twice when the pull request source branch is in the same repository.
push:
branches:
- "trunk-patch"
- "trunk-minor"
- "trunk-major"
- "trunk-*"
tags:
- "v*"

# Trigger on request.
workflow_dispatch:

env:
Expand All @@ -32,12 +26,12 @@ jobs:
release:
name: Build release tarball
runs-on: ubuntu-latest
container:
image: glotzerlab/ci:2023.10.09-ubuntu22.04
options: -u 0
# container:
# image: glotzerlab/ci:2023.10.09-ubuntu22.04
# options: -u 0

steps:
- uses: actions/[email protected].4
- uses: actions/[email protected].6
with:
fetch-depth: 0
submodules: true
Expand Down Expand Up @@ -66,11 +60,14 @@ jobs:
- name: Tar source
run: tar -cvzf "${name}-${tag:1}.tar.gz" "${name}-${tag:1}"

- name: Tar source
run: tar -cvJf "${name}-${tag:1}.tar.xz" "${name}-${tag:1}"

- uses: actions/[email protected]
with:
name: release
path: |
*.tar.gz
*.tar.*
changelog.md
publish:
Expand All @@ -88,7 +85,7 @@ jobs:
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/v')
with:
files: "*.tar.gz"
files: "*.tar.*"
body_path: changelog.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
schedule:
- cron: '0 19 * * *'

# Trigger on request.
workflow_dispatch:

jobs:
Expand Down

0 comments on commit 8482a93

Please sign in to comment.