Skip to content
Merged
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
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

32 changes: 31 additions & 1 deletion .github/workflows/build_jar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for version detection
fetch-tags: true # Explicitly fetch tags

- name: Fetch git tags
run: git fetch --force --tags

- name: Set up Python (for version script)
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Update version files
run: |
python -m pip install setuptools-scm
python scripts/update_versions.py

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
Expand All @@ -30,12 +47,25 @@ jobs:
needs: [build_and_test]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for version detection

- name: Set up Python (for version script)
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Update version files
run: |
python -m pip install setuptools-scm
python scripts/update_versions.py

- uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
architecture: x64

- run: mvn -B package --file pom.xml -DskipTests
- run: mkdir staging && cp target/*jar-with-dependencies.jar staging
- uses: actions/upload-artifact@v4
Expand Down
28 changes: 27 additions & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ jobs:
steps:
- uses: actions/checkout@v3
name: Check out
with:
fetch-depth: 0 # Fetch all history for setuptools-scm
fetch-tags: true # Explicitly fetch tags

- name: Fetch git tags
run: git fetch --force --tags
shell: bash

- uses: ilammy/msvc-dev-cmd@v1
name: Add MSVS Path
Expand All @@ -32,6 +39,12 @@ jobs:
with:
python-version: '3.11'

- name: Update version files
run: |
python -m pip install setuptools-scm
python scripts/update_versions.py
shell: bash

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel delvewheel wheel
Expand Down Expand Up @@ -82,6 +95,13 @@ jobs:
steps:
- uses: actions/checkout@v3
name: Check out
with:
fetch-depth: 0 # Fetch all history for setuptools-scm
fetch-tags: true # Explicitly fetch tags

- name: Fetch git tags
run: git fetch --force --tags
shell: bash

- uses: ilammy/msvc-dev-cmd@v1
name: Add MSVS Path
Expand All @@ -90,7 +110,13 @@ jobs:
name: Install Python
with:
python-version: '3.11'


- name: Update version files
run: |
python -m pip install setuptools-scm
python scripts/update_versions.py
shell: bash

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel delvewheel wheel
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/publish_maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for version detection

- name: Set up Python (for version script)
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Update version files
run: |
python -m pip install setuptools-scm
python scripts/update_versions.py

- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
Expand All @@ -21,6 +34,7 @@ jobs:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Substituted with the value stored in the referenced secret
gpg-passphrase: SIGN_KEY_PASS # Env var that holds the key's passphrase
cache: 'maven'

- name: Build & Deploy
run: |
# -U force updates just to make sure we are using latest dependencies
Expand Down
41 changes: 40 additions & 1 deletion .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ jobs:
steps:
- uses: actions/checkout@v3
name: Check out
with:
fetch-depth: 0 # Fetch all history for setuptools-scm
fetch-tags: true # Explicitly fetch tags

- name: Fetch git tags
run: git fetch --force --tags
shell: bash

- uses: ilammy/msvc-dev-cmd@v1
name: Add MSVS Path
Expand All @@ -31,6 +37,19 @@ jobs:
with:
python-version: '3.11'

- name: Update version files
run: |
python -m pip install setuptools-scm
# Extract version from tag name if this is a release
if [ -n "$GITHUB_REF_NAME" ] && [[ "$GITHUB_REF_NAME" == v* ]]; then
VERSION="${GITHUB_REF_NAME#v}"
echo "Using release version: $VERSION"
python scripts/update_versions.py --version "$VERSION"
else
python scripts/update_versions.py
fi
shell: bash

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel delvewheel wheel
Expand Down Expand Up @@ -84,6 +103,13 @@ jobs:
steps:
- uses: actions/checkout@v3
name: Check out
with:
fetch-depth: 0 # Fetch all history for setuptools-scm
fetch-tags: true # Explicitly fetch tags

- name: Fetch git tags
run: git fetch --force --tags
shell: bash

- uses: ilammy/msvc-dev-cmd@v1
name: Add MSVS Path
Expand All @@ -92,7 +118,20 @@ jobs:
name: Install Python
with:
python-version: '3.11'


- name: Update version files
run: |
python -m pip install setuptools-scm
# Extract version from tag name if this is a release
if [ -n "$GITHUB_REF_NAME" ] && [[ "$GITHUB_REF_NAME" == v* ]]; then
VERSION="${GITHUB_REF_NAME#v}"
echo "Using release version: $VERSION"
python scripts/update_versions.py --version "$VERSION"
else
python scripts/update_versions.py
fi
shell: bash

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel delvewheel wheel
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Release Please

on:
push:
branches:
- master

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
version: ${{ steps.release.outputs.version }}
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: python
package-name: filepattern

# If a release was created, update version files and create a follow-up commit
- name: Checkout code
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v4
with:
ref: ${{ steps.release.outputs.tag_name }}

- name: Set up Python
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install setuptools-scm
if: ${{ steps.release.outputs.release_created }}
run: pip install setuptools-scm

- name: Update version files
if: ${{ steps.release.outputs.release_created }}
run: |
python scripts/update_versions.py --version ${{ steps.release.outputs.version }}
echo "Updated version files to ${{ steps.release.outputs.version }}"

- name: Upload .version file as release asset
if: ${{ steps.release.outputs.release_created }}
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release upload ${{ steps.release.outputs.tag_name }} .version --clobber

trigger-publish:
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
runs-on: ubuntu-latest
steps:
- name: Trigger PyPI publish
uses: actions/github-script@v7
with:
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'publish_pypi.yml',
ref: '${{ needs.release-please.outputs.tag_name }}'
})

- name: Trigger Maven publish
uses: actions/github-script@v7
with:
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'publish_maven.yml',
ref: '${{ needs.release-please.outputs.tag_name }}'
})
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ data/

# Test file
test.py
test_*.py

# Local build artifacts
local_install/
pybind11*/
*.zip
*.ogv

# Prerequisites
*.d
Expand Down
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "2.1.4"
}
1 change: 1 addition & 0 deletions .version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.1.4
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changelog

All notable changes to this project will be documented in this file.

This file is automatically generated by [release-please](https://github.com/googleapis/release-please). Do not edit manually.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.1.4](https://github.com/PolusAI/filepattern/releases/tag/v2.1.4) (2025-03-10)

### Bug Fixes

* handle non-alphanumeric characters in infer_pattern ([#102](https://github.com/PolusAI/filepattern/pull/102))
Loading
Loading