Skip to content

Commit

Permalink
ci: Add release flow
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Feb 18, 2024
1 parent 296f302 commit 98ff874
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: 'Release new version'

on:
push:
tags:
- 'v*.*.*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: eifinger/setup-rye@v1
- name: Build package
id: build_package
run: |
rye build
- uses: actions/upload-artifact@v4
with:
name: packages-${{ github.ref }}
path: dist/
gh-release:
runs-on: ubuntu-latest
needs: [build]
premissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: packages-${{ github.ref }}
path: dist/
- uses: ncipollo/release-action@v1
with:
artifacts: 'dist/*'
body: 'See https://github.com/attakei/rst-multi-refs/blob/main/CHANGELOG.rst'
draft: false
name: Release ${{ github.ref }}
tag: ${{ github.ref }}
prerelease: false
pypi-publish:
runs-on: ubuntu-latest
needs: [build]
environment:
name: pypi
url: https://pypi.org/p/rst-multi-refs
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v4
with:
name: packages-${{ github.ref }}
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 98ff874

Please sign in to comment.