From 159c27afce06afbc60ddad2401bfbf3f5b7c2f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Wed, 26 Apr 2023 17:34:55 -0700 Subject: [PATCH] Add trusted-publish Committed via https://github.com/asottile/all-repos --- .github/workflows/check.yml | 1 + .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 9c6e967..28e0b97 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,6 +1,7 @@ name: check on: push: + tags-ignore: ["**"] pull_request: schedule: - cron: "0 8 * * *" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..46da446 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release to PyPI +on: + push: + tags: ["*"] + +jobs: + release: + runs-on: ubuntu-22.04 + environment: + name: release + url: https://pypi.org/p/filelock + permissions: + id-token: write + steps: + - name: Setup python to build package + uses: actions/setup-python@v4 + with: + python-version: "3.11" + - name: Install build + run: python -m pip install build + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Build package + run: pyproject-build -s -w . -o dist + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@v1.8.5