Skip to content

Commit

Permalink
chore(ci): use shared pipelines (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
hairmare committed Dec 10, 2023
1 parent 24c58a3 commit 8dd4e63
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 68 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/lint-and-test.yaml

This file was deleted.

41 changes: 6 additions & 35 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,13 @@ name: Release

on:
pull_request:
push:
branches: [main]
release:
types: [created]

jobs:
pypi:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- run: pipx install poetry

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'poetry'

- run: poetry install

- name: Configure poetry
run: poetry config pypi-token.pypi ${{ secrets.RABE_PYPI_TOKEN }}
if: ${{ github.event_name != 'pull_request' }}

- name: Set dry-run flag
id: dry-run
run: |
flag="--dry-run"
if ${{ github.event_name != 'pull_request' }}
then
flag=""
fi
echo "flag=$flag" >> $GITHUB_OUTPUT
- run: poetry version $(git describe --tags --abbrev=0 --exact-match || (git describe --tags --abbrev=0 --dirty=+dev|tr -d '\n'; echo "+dev"))

- run: poetry publish --build --no-interaction ${{ steps.dry-run.outputs.flag }}
python-poetry:
uses: radiorabe/actions/.github/workflows/release-python-poetry.yaml@v0.18.0
secrets:
RABE_PYPI_TOKEN: ${{ secrets.RABE_PYPI_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Lint and Test

on:
pull_request:
branches:
- main

jobs:
pre-commit:
uses: radiorabe/actions/.github/workflows/test-pre-commit.yaml@v0.18.0
test-python-poetry:
uses: radiorabe/actions/.github/workflows/test-python-poetry.yaml@v0.18.0

0 comments on commit 8dd4e63

Please sign in to comment.