mirror of
https://github.com/Hopiu/djLint.git
synced 2026-03-17 05:50:24 +00:00
68 lines
2.2 KiB
YAML
68 lines
2.2 KiB
YAML
# This workflow will upload a Python Package using Twine when a release is created
|
|
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
|
|
|
|
# This workflow uses actions that are not certified by GitHub.
|
|
# They are provided by a third-party and are governed by
|
|
# separate terms of service, privacy policy, and support
|
|
# documentation.
|
|
|
|
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Setup Poetry
|
|
uses: snok/install-poetry@v1
|
|
|
|
- name: Update wheels in docs demo
|
|
run: |
|
|
# remove old wheels
|
|
rm -f docs/src/static/py/*
|
|
# build new wheels
|
|
poetry run pip wheel . -w docs/src/static/py
|
|
# rename wheels
|
|
cd docs/src/static/py
|
|
mv djlint* djlint-99-py3-none-any.whl
|
|
mv click* click-99-py3-none-any.whl
|
|
mv colorama* colorama-99-py3-none-any.whl
|
|
mv cssbeautifier* cssbeautifier-99-py3-none-any.whl
|
|
mv EditorConfig* EditorConfig-99-py3-none-any.whl
|
|
mv html_tag_names* html_tag_names-99-py3-none-any.whl
|
|
mv html_void_elements* html_void_elements-99-py3-none-any.whl
|
|
mv importlib_metadata* importlib_metadata-99-py3-none-any.whl
|
|
mv jsbeautifier* jsbeautifier-99-py3-none-any.whl
|
|
mv pathspec* pathspec-99-py3-none-any.whl
|
|
mv PyYAML* PyYAML-99-py3-none-any.whl
|
|
mv zipp* zipp-99-py3-none-any.whl
|
|
|
|
- name: Semantic Release
|
|
uses: cycjimmy/semantic-release-action@v3
|
|
|
|
id: semantic
|
|
with:
|
|
semantic_version: 18
|
|
extra_plugins: |
|
|
@semantic-release/changelog@6
|
|
@semantic-release/exec
|
|
@semantic-release/git@10
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
- name: Build and publish package
|
|
if: steps.semantic.outputs.new_release_published == 'true'
|
|
uses: JRubics/poetry-publish@v1.15
|
|
with:
|
|
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
|