Skip to content

Commit b2346e3

Browse files
committed
Add workflows; make version match Flitter
1 parent 05d8828 commit b2346e3

File tree

3 files changed

+80
-1
lines changed

3 files changed

+80
-1
lines changed

.github/workflows/ci-lint.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
name: CI lint
3+
4+
on:
5+
push:
6+
branches: ["main"]
7+
paths:
8+
- ".github/workflows/ci-lint.yml"
9+
- "pyproject.toml"
10+
- ".flake8"
11+
- "src/**/*.py"
12+
pull_request:
13+
branches: ["main"]
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up Python 3.12
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.12"
24+
- name: Install linter dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
python -m pip install flake8
28+
- name: Lint Python code with flake8
29+
run: |
30+
flake8 src --count --show-source --statistics
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Release package
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.12"
19+
- name: Install build dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
python -m pip install build
23+
- name: Build package
24+
run: |
25+
python -m build --sdist
26+
- name: Store the distribution
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: python-sdist
30+
path: dist/
31+
32+
publish-to-pypi:
33+
name: Publish package to PyPI
34+
needs:
35+
- build
36+
runs-on: ubuntu-latest
37+
environment:
38+
name: pypi
39+
url: https://pypi.org/p/flitter-lang
40+
permissions:
41+
id-token: write
42+
steps:
43+
- name: Retrieve the distribution
44+
uses: actions/download-artifact@v4
45+
with:
46+
path: dist/
47+
merge-multiple: true
48+
- name: Publish to PyPI
49+
uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "flitter-pygments"
7-
version = "1.0.0"
7+
version = "1.0.0b5"
88
description = "A Pygments plugin providing a lexer for the Flitter visuals functional programming language"
99
authors = [
1010
{name = "Jonathan Hogg", email = "[email protected]"},

0 commit comments

Comments
 (0)