-
Notifications
You must be signed in to change notification settings - Fork 56
34 lines (33 loc) · 972 Bytes
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
name: Publish
on:
release:
types: [released]
jobs:
build-publish:
name: Build and publish Python distributions
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: python -m pip install --upgrade pip build
- name: Generate Lark Parser
run: |
pip install -r requirements.txt -e .
python hcl2/parser.py
- name: Build tarball
run: python3 -m build
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}