Skip to content

Merge pull request #8 from JeremieGince/dev #9

Merge pull request #8 from JeremieGince/dev

Merge pull request #8 from JeremieGince/dev #9

Workflow file for this run

name: Build dist
on:
push:
branches: ["main"]
permissions:
contents: write
jobs:
Build-Dist:
name: Build dist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m venv ./venv
. ./venv/bin/activate
python -m pip install --upgrade pip
pip install wheel build
pip install poetry
poetry install --with=dev --no-interaction --no-ansi
- name: Gather new package version
id: version
uses: anothrNick/github-tag-action@2.12.0
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
WITH_V: false
DEFAULT_BUMP: patch
DRY_RUN: true
- name: Bump package version in pyproject.toml
run: |
poetry version ${{steps.version.outputs.new_tag}}
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add pyproject.toml
git diff-index --quiet HEAD || git commit -m "Updating version of pyproject.toml [skip actions]"
git push
- name: Build dist
run: |
. ./venv/bin/activate
python -m build
- name: Commit the new dist
run: |
git add -f dist
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "Update dist"
- name: Push the new dist
uses: ad-m/github-push-action@master
with:
github_token: ${{secrets.GITHUB_TOKEN}}
branch: main
force: true
directory: dist
- name: Create Tag and Release
id: create_tag_and_release
uses: anothrNick/github-tag-action@2.12.0
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
WITH_V: false
DEFAULT_BUMP: patch
DRY_RUN: false