forked from emilhe/dash-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: bump more-itertool down to ^8.0.0, update actions & deps
- Loading branch information
krishnakumar
committed
Oct 26, 2023
1 parent
76efb4a
commit 631d29a
Showing
12 changed files
with
5,557 additions
and
5,793 deletions.
There are no files selected for viewing
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# This workflows 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 | ||
|
||
name: Release Python Package | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: release-${{ github.head_ref }}-1 | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
env: | ||
PYTHON_VERSION: "3.10" | ||
POETRY_VERSION: "1.6.1" | ||
NODE_VERSION: '18' | ||
permissions: | ||
# write permission is required to create a github release | ||
contents: write | ||
# write permission is required for autolabeler | ||
# otherwise, read permission is required at least | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4.1.1 | ||
with: | ||
token: ${{ secrets.GIT_TOKEN }} | ||
- uses: actions/setup-node@v4.0.0 | ||
with: | ||
node-version: '${{ env.NODE_VERSION }}' | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Set up Python | ||
uses: actions/setup-python@v4.7.1 | ||
with: | ||
python-version: '${{ env.PYTHON_VERSION }}' | ||
- name: Install poetry | ||
uses: Gr1N/setup-poetry@v8 | ||
with: | ||
poetry-version: '${{ env.POETRY_VERSION }}' | ||
- name: Cache poetry | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3.3.2 | ||
with: | ||
path: ~/.cache/pypoetry/virtualenvs | ||
key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ hashFiles('poetry.lock') }}-python-${{ env.PYTHON_VERSION }} | ||
- run: poetry --version | ||
- name: Install dependencies | ||
run: poetry install | ||
- name: Build js | ||
run: | | ||
poetry run npm install | echo "Ignore npm install error" | ||
poetry run npm run build | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Build python package | ||
run: | | ||
poetry build --ansi | ||
- name: Check if there is a parent commit | ||
id: check-parent-commit | ||
run: | | ||
echo "sha=$(git rev-parse --verify --quiet HEAD^)" | tee -a "$GITHUB_OUTPUT" | ||
- name: Detect and tag new version | ||
if: steps.check-parent-commit.outputs.sha != '' | ||
id: check-version | ||
uses: salsify/action-detect-and-tag-new-version@v2.0.3 | ||
with: | ||
tag-template: "v{VERSION}" | ||
tag-annotation-template: "Released Package Version v{VERSION}" | ||
version-command: | | ||
bash -o pipefail -c "poetry version | awk '{ print \$2 }'" | ||
- name: Read CHANGELOG.md and use it as body of new release | ||
id: read-changelog | ||
shell: bash | ||
run: | | ||
r=$(cat ./CHANGELOG.md) # <--- Read CHANGELOG.md (Provide correct path as per your repo) | ||
r="${r//'%'/'%25'}" # Multiline escape sequences for % | ||
r="${r//$'\n'/'%0A'}" # Multiline escape sequences for '\n' | ||
r="${r//$'\r'/'%0D'}" # Multiline escape sequences for '\r' | ||
echo "CHANGELOG=$r" >> $GITHUB_OUTPUT # <--- Set environment variable | ||
- name: Upload release | ||
if: steps.check-version.outputs.tag != '' | ||
id: upload-release | ||
uses: svenstaro/upload-release-action@2.7.0 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ steps.check-version.outputs.tag }} | ||
body: ${{ steps.read-changelog.outputs.CHANGELOG }} | ||
overwrite: true | ||
file: dist/dash_extensions* | ||
file_glob: true |
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
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
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
Oops, something went wrong.