Skip to content

Commit

Permalink
Merge pull request #28 from Airthings/update-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
LaStrada committed Feb 5, 2024
2 parents 1b58d2c + 58874cd commit 2252538
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ jobs:
labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: '3.11'

- name: Install labels
run: pip install labels

- name: Sync config with Github
run: labels -u ${{ github.repository_owner }} -t ${{ secrets.GITHUB_TOKEN }} sync -f .github/labels.toml
15 changes: 11 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- uses: snok/install-poetry@v1
python-version: '3.11'

- name: Setup Poetry
uses: snok/install-poetry@v1

- name: Install Dependencies
run: poetry install

- name: Run linters
run: poetry run make lint

- name: Run tests
run: poetry run pytest
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@ jobs:
contents: write
steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.x"
python-version: '3.11'

- name: Update pyproject.toml Version
run: |
pip install tomlkit
Expand All @@ -42,6 +44,7 @@ jobs:
with open('pyproject.toml', 'w') as file:
file.write(tomlkit.dumps(content))
"
- name: Update __init__.py version
run: |
version="${{ github.event.inputs.tag }}"
Expand All @@ -57,13 +60,16 @@ jobs:
git push
git tag ${{ github.event.inputs.tag }}
git push --tags
- name: Build source and wheel distributions
run: |
python -m pip install --upgrade build twine
python -m build
twine check --strict dist/*
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

- name: Release
uses: softprops/action-gh-release@v1
with:
Expand Down

0 comments on commit 2252538

Please sign in to comment.