feat: python build and pypi publishing #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release everything! | |
on: | |
push: | |
branches: | |
- main | |
# paths: | |
# - maps | |
jobs: | |
releaser: | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
registry-url: 'https://registry.npmjs.org' | |
- uses: actions/setup-python@v4 | |
- name: Build | |
run: | | |
node scripts/build.js ${{ github.run_id }} | |
cd build/pypi | |
python -m build | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/raw/*" | |
tag: v1.0.${{ github.run_id }} | |
- name: npm publish | |
working-directory: build/npm | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: build/pypi/dist |