Skip to content

Commit

Permalink
Add release/publish flow
Browse files Browse the repository at this point in the history
  • Loading branch information
nielstron committed Jul 24, 2024
1 parent a6b2ee1 commit 702a581
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 13 deletions.
19 changes: 19 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
changelog:
categories:
- title: 🏕 Features
labels:
- '*'
exclude:
labels:
- dependencies
- bugfix
- breaking
- title: 👒 Dependencies
labels:
- dependencies
- title: 🐛 Bugfixes
labels:
- bugfix
- title: 🔨 Breaking Changes
labels:
- breaking
14 changes: 1 addition & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: CI/CD
on:
push:
pull_request:
release:
types: [created]

jobs:

Expand Down Expand Up @@ -60,14 +58,4 @@ jobs:
poetry run coverage run -a --source=uplc -m uplc dump build/fibonacci/script.cbor --from-cbor
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3

- name: Publish to PyPI
if: github.event_name == 'release' && matrix.python-version == '3.10'
env:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
poetry config pypi-token.pypi $PYPI_PASSWORD
poetry build
poetry publish
uses: codecov/codecov-action@v3
25 changes: 25 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Python package
on:
push:
tags:
- "*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# If there isn't a release for this version, create a new one.
- uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
makeLatest: true
prerelease: true
skipIfReleaseExists: true
# Build and publish the package to pypi.
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
python_version: "3.10"
pypi_token: ${{ secrets.PYPI_PASSWORD }}
package_directory: "uplc"
poetry_install_options: "--without dev"

0 comments on commit 702a581

Please sign in to comment.