Skip to content

πŸ”– Release 0.2.0 #4

πŸ”– Release 0.2.0

πŸ”– Release 0.2.0 #4

Workflow file for this run

name: Release
on:
push:
tags:
- v*
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: πŸ›ŽοΈ Checkout
uses: actions/checkout@v3
- name: πŸš€ Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: πŸš€ Setup node
uses: actions/[email protected]
with:
node-version: 18
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"
- name: πŸ”§ Install dependencies
run: pnpm install
- name: 🚧 Build dist files
run: pnpm build
- name: πŸ“¦οΈ Upload dist
uses: actions/upload-artifact@v3
with:
name: dist
path: nb_cli_plugin_webui/dist
- name: πŸš€ Setup Python environment
uses: ./.github/actions/setup-python
- name: πŸ”– Get version
id: version
run: |
echo "VERSION=$(poetry version -s)" >> $GITHUB_OUTPUT
echo "TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: βœ… Check version
if: steps.version.outputs.VERSION != steps.version.outputs.TAG_VERSION
run: exit 1
- name: 🚧 Build package
run: poetry build
- name: πŸ“¦οΈ Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: πŸ“¦οΈ Publish package to GitHub
run: |
gh release upload --clobber ${{ steps.version.outputs.TAG_NAME }} dist/*.tar.gz dist/*.whl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}