Skip to content

Commit

Permalink
ci: setup automated release (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasvotava authored May 19, 2024
1 parent bdb6ffb commit 89efeec
Show file tree
Hide file tree
Showing 5 changed files with 281 additions and 16 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release to PyPI

on:
push:
tags:
- "*.*.*"
jobs:
pypi-publish:
name: Publish release ${{ github.ref_name}} to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.3
virtualenvs-create: false
- name: Install dependencies
run: poetry install
- name: Ensure version matches tag
run: poetry version ${{github.ref_name}}
- name: Build package
run: poetry build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Get changelog
id: changelog
run: |
echo "CHANGELOG=$(cz changelog --dry-run ${{github.ref_name}})" >> $GITHUB_OUTPUT
- name: Create Github release
uses: softprops/action-gh-release@v2
with:
files: dist/*.*
body: ${{steps.changelog.outputs.CHANGELOG}}
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test tap-airtable
name: Test

on: [push]

Expand Down Expand Up @@ -34,9 +34,9 @@ jobs:
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
Expand Down
12 changes: 0 additions & 12 deletions CHANGELOG.md

This file was deleted.

Loading

0 comments on commit 89efeec

Please sign in to comment.