Skip to content

Commit

Permalink
Merge pull request #3 from brown-ccv/feat-packaging
Browse files Browse the repository at this point in the history
[Feat] Package and Publishing
  • Loading branch information
kmilo9999 authored Nov 12, 2024
2 parents 7cfa9d1 + d33fec0 commit ded9b28
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build and Upload Release Asset

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

jobs:
build-and-upload:
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install `uv`
run: |
python -m pip install --upgrade pip
pip install astral-sh[uv] # Install `uv` for building
- name: Build the package with `uv`
run: uv build

- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
name: jawroski-napari-plugin-dist.zip
release_id: ${{ steps.create_release.outputs.id }}
asset_path: dist/*
asset_content_type: application/zip

0 comments on commit ded9b28

Please sign in to comment.