From 08810973abe67c9a155c4d6ab00a81be74121ab6 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Mon, 8 Jul 2024 20:12:32 +0100 Subject: [PATCH] Add release workflow --- .github/workflows/release.yaml | 29 +++++++++++++++++++++++++++++ Makefile | 3 +++ pyproject.toml | 2 +- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..43e9997 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,29 @@ +name: Release + +on: + push: + tags: + - "[0-9]+.[0-9]+.[0-9]+" +jobs: + release-build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.11"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Build release assets + run: | + make build + + - name: Create GitHub release + uses: softprops/action-gh-release@v2 + with: + name: "Version ${{ github.ref_name }}" + generate_release_notes: true + files: | + dist/* \ No newline at end of file diff --git a/Makefile b/Makefile index 759a2bf..03e1709 100644 --- a/Makefile +++ b/Makefile @@ -9,3 +9,6 @@ tests: .venv lint: .venv python3 -m poetry run ruff check --output-format=github --select=E9,F63,F7,F82 --target-version=py37 . python3 -m poetry run ruff check --output-format=github --target-version=py37 . + +build: .venv + python3 -m poetry build \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 5d3ebfe..3a116db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pydantic-spaceapi" -version = "1.3.2" +version = "0.1.0" description = "" authors = ["Andrew Williams "] license = "MIT"