Skip to content

Commit f5b7d59

Browse files
committed
fix(release): update ci to publish vue3
1 parent bac3e0b commit f5b7d59

1 file changed

Lines changed: 26 additions & 3 deletions

File tree

.github/workflows/test_and_release.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,24 @@ jobs:
102102
]
103103
runs-on: ubuntu-latest
104104
if: github.event_name == 'push'
105+
environment:
106+
name: pypi
107+
url: https://pypi.org/p/trame-leaflet
108+
permissions:
109+
id-token: write # IMPORTANT: mandatory for trusted publishing
110+
contents: write # IMPORTANT: mandatory for making GitHub Releases
105111

106112
steps:
107113
- name: Checkout
108114
uses: actions/checkout@v2
109115
with:
110116
fetch-depth: 0
111117

118+
- name: Set up Python 3.11
119+
uses: actions/setup-python@v5
120+
with:
121+
python-version: "3.11"
122+
112123
- name: Set Up Node
113124
uses: actions/setup-node@v4
114125
with:
@@ -120,9 +131,21 @@ jobs:
120131
npm i
121132
npm run build
122133
134+
- name: Build Vue3 Components
135+
run: |
136+
cd vue3-components
137+
npm i
138+
npm run build
139+
pip install black trame PyYAML
140+
python -m trame.tools.widgets --config ./api.yaml --output ..
141+
black ../trame ../trame_leaflet
142+
123143
- name: Python Semantic Release
124-
uses: relekang/python-semantic-release@v7.34.6
144+
id: release
145+
uses: relekang/python-semantic-release@v9.15.2
125146
with:
126147
github_token: ${{ secrets.GITHUB_TOKEN }}
127-
repository_username: __token__
128-
repository_password: ${{ secrets.PYPI_API_TOKEN }}
148+
149+
- name: Publish package distributions to PyPI
150+
if: steps.release.outputs.released == 'true'
151+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)