Skip to content

Create a GitHub action to build on push and release on tag #2

Create a GitHub action to build on push and release on tag

Create a GitHub action to build on push and release on tag #2

Workflow file for this run

name: Build CI/CD
on:
push:
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
path: dist/*
- name: Create release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/*