Skip to content

Commit 40a9e41

Browse files
authored
Merge pull request #9 from forcedotcom/workflows
Updated lint workflow and added release one.
2 parents 2baa80d + a36c197 commit 40a9e41

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

.github/workflows/lint.yml renamed to .github/workflows/lint_and_test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint
1+
name: Lint and Test
22

33
on:
44
pull_request:
@@ -26,3 +26,6 @@ jobs:
2626

2727
- name: Run lint
2828
run: make lint
29+
30+
- name: Run tests
31+
run: make test

.github/workflows/release.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.11'
19+
20+
- name: Install Poetry
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install poetry
24+
25+
- name: Install project dependencies
26+
run: poetry install --no-interaction --only main
27+
28+
- name: Build package
29+
run: make package
30+
31+
- name: Store package
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: dist
35+
path: dist/
36+
37+
publish:
38+
needs: build
39+
runs-on: ubuntu-latest
40+
environment:
41+
name: pypi
42+
url: https://pypi.org/project/salesforce-data-customcode/
43+
steps:
44+
- name: Download package
45+
uses: actions/download-artifact@v4
46+
with:
47+
name: dist
48+
path: dist/
49+
50+
- name: Publish to PyPI
51+
env:
52+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
53+
run: poetry publish --username __token__ --password $PYPI_TOKEN

0 commit comments

Comments
 (0)