Skip to content

Commit

Permalink
Start using PyPi trusted publishing (#198)
Browse files Browse the repository at this point in the history
* Start using PyPi trusted publishing

* Fix issue with yamllint
  • Loading branch information
klaasnicolaas committed May 28, 2023
1 parent c2ab962 commit c0ba98a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/labels.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Sync labels

# yamllint disable-line rule:truthy
on:
push:
branches:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Release Drafter

# yamllint disable-line rule:truthy
on:
push:
branches:
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
release:
name: Releasing to PyPi
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v3
Expand All @@ -39,9 +42,5 @@ jobs:
poetry version --no-interaction "${version}"
- name: 🏗 Build package
run: poetry build --no-interaction
- name: 🚀 Publish to PyPi
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi "${PYPI_TOKEN}"
poetry publish --no-interaction
- name: 🚀 Publish package to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
1 change: 1 addition & 0 deletions .github/workflows/tweet-release.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Tweet on Release

# yamllint disable rule:line-length
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
Expand Down
4 changes: 2 additions & 2 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
ignore: |
.github/workflows
.venv/lib
rules:
braces:
level: error
Expand All @@ -26,7 +26,7 @@ rules:
comments:
level: error
require-starting-space: true
min-spaces-from-content: 2
min-spaces-from-content: 1
comments-indentation:
level: error
document-end:
Expand Down

0 comments on commit c0ba98a

Please sign in to comment.