diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index b427aea6..048d2196 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -1,6 +1,6 @@ name: Black -on: [pull_request, push] +on: [ pull_request, push ] jobs: black: @@ -19,4 +19,4 @@ jobs: run: pip install black - name: Check code style of package. - run: black --check atproto \ No newline at end of file + run: black --check atproto diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml deleted file mode 100644 index f86cc61c..00000000 --- a/.github/workflows/pypi.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Build and upload package to PyPI - -on: - push: - branches: - - pypi - release: - types: [created] - -jobs: - build_and_publish: - runs-on: ubuntu-latest - permissions: - id-token: write - - steps: - - name: Checkout repository. - uses: actions/checkout@v2 - - - name: Setup Python. - uses: actions/setup-python@v2 - with: - python-version: 3.7 - - - name: Setup Poetry. - run: curl -sSL https://github.com/raw/python-poetry/poetry/master/install-poetry.py | python - - - name: Add Poetry to PATH. - run: echo "${HOME}/.poetry/bin" >> $GITHUB_PATH - - - name: Install dependencies. - run: poetry install - - - name: Build package. - run: poetry build - - - name: Publish a Python distribution to PyPI. - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eeb5b1a1..0185b618 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,18 +1,38 @@ -name: Create Release from the version tag +name: Create and Publish release from the version tag on: - push: - tags: - - "v*.*.*" + push: + tags: + - "v*.*.*" jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout repository. - uses: actions/checkout@v3 - - - name: Create Release. - uses: softprops/action-gh-release@v1 - with: - generate_release_notes: true + build: + runs-on: ubuntu-latest + permissions: + id-token: write + + steps: + - name: Checkout repository. + uses: actions/checkout@v3 + + - name: Create Release. + uses: softprops/action-gh-release@v1 + with: + generate_release_notes: true + + - name: Setup Python. + uses: actions/setup-python@v2 + with: + python-version: 3.7 + + - name: Setup Poetry. + run: curl -sSL https://install.python-poetry.org | python - -y + + - name: Add Poetry to PATH. + run: echo "${HOME}/.poetry/bin" >> $GITHUB_PATH + + - name: Build package. + run: poetry build + + - name: Publish a Python distribution to PyPI. + uses: pypa/gh-action-pypi-publish@release/v1