Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoireW committed Aug 23, 2024
1 parent 06a7c1c commit 0120d88
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
id: checkout

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.12

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
id: checkout

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.12

Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: release version

on:
release:
types:
- published

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
environment: release
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
id: checkout

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install dependencies with poetry
run: |
sudo apt update
sudo apt install libpq-dev
pip install poetry
- name: Create package
shell: bash
run: |
sed -i "s/0.0.0/${{ github.event.release.tag_name }}/" dblinter/__init__.py
sed -i "s/0.0.0/${{ github.event.release.tag_name }}/" pyproject.toml
poetry build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: decathlon/dblinter:${{ github.event.release.tag_name }}

0 comments on commit 0120d88

Please sign in to comment.