Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint
name: Lint and Test

on:
pull_request:
Expand Down Expand Up @@ -26,3 +26,6 @@ jobs:

- name: Run lint
run: make lint

- name: Run tests
run: make test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 oh right! I had a hard time enabling this pre OSS, but now it's this easy. Sweet.

53 changes: 53 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish to PyPI

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

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

- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry

- name: Install project dependencies
run: poetry install --no-interaction --only main

- name: Build package
run: make package

- name: Store package
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

publish:
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/salesforce-data-customcode/
steps:
- name: Download package
uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Publish to PyPI
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: poetry publish --username __token__ --password $PYPI_TOKEN