From 4edbd732cbda67c2be757f54c696c97d3ca0696f Mon Sep 17 00:00:00 2001 From: Hugo Cachitas Date: Tue, 9 Apr 2024 23:53:56 +0100 Subject: [PATCH] Create release.yml --- .github/workflows/release.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f82eec6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: Release + +on: + push: + tags: + - "*" + +jobs: + pypi-publish: + name: Publish to PyPI + runs-on: ubuntu-latest + permissions: + # This permission is needed for private repositories. + contents: read + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + steps: + - uses: actions/checkout@v4 + + - uses: pdm-project/setup-pdm@v4 + + - name: Publish package distributions to PyPI + run: pdm publish + + - name: Create Release + uses: actions/create-release@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: v${{ github.ref }} + draft: false