Skip to content

Commit 9287d57

Browse files
Initial Commit
0 parents  commit 9287d57

7 files changed

Lines changed: 1295 additions & 0 deletions

File tree

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Publish librelyrics-deezer to PyPI / GitHub
2+
3+
on:
4+
5+
push:
6+
7+
tags:
8+
9+
- "v*"
10+
11+
jobs:
12+
13+
build-n-publish:
14+
15+
name: Build and publish librelyrics-deezer to PyPI
16+
17+
runs-on: ubuntu-latest
18+
19+
permissions:
20+
contents: write
21+
id-token: write
22+
23+
steps:
24+
25+
- name: Checkout source
26+
27+
uses: actions/checkout@v2
28+
29+
- name: Set up Python
30+
31+
uses: actions/setup-python@v2
32+
33+
with:
34+
35+
python-version: "3.x"
36+
37+
- name: Build source and wheel distributions
38+
39+
run: |
40+
41+
python -m pip install --upgrade build twine
42+
43+
python -m build
44+
45+
twine check --strict dist/*
46+
47+
- name: Publish distribution to PyPI
48+
49+
uses: pypa/gh-action-pypi-publish@release/v1
50+
51+
- name: Create GitHub Release
52+
53+
id: create_release
54+
55+
uses: actions/create-release@v1
56+
57+
env:
58+
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
61+
with:
62+
63+
tag_name: ${{ github.ref }}
64+
65+
release_name: ${{ github.ref }}
66+
67+
draft: false
68+
69+
prerelease: false
70+
71+
- name: Get Asset name
72+
73+
run: |
74+
75+
export PKG=$(ls dist/ | grep tar)
76+
77+
set -- $PKG
78+
79+
echo "name=$1" >> $GITHUB_ENV
80+
81+
- name: Upload Release Asset (sdist) to GitHub
82+
83+
id: upload-release-asset
84+
85+
uses: actions/upload-release-asset@v1
86+
87+
env:
88+
89+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90+
91+
with:
92+
93+
upload_url: ${{ steps.create_release.outputs.upload_url }}
94+
95+
asset_path: dist/${{ env.name }}
96+
97+
asset_name: ${{ env.name }}
98+
99+
asset_content_type: application/zip

.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# Distribution / packaging
7+
build/
8+
dist/
9+
*.egg-info/
10+
*.egg
11+
.eggs/
12+
MANIFEST
13+
14+
# Virtual environments
15+
.venv/
16+
venv/
17+
env/
18+
19+
# IDE
20+
.vscode/
21+
.idea/
22+
23+
# OS
24+
.DS_Store
25+
Thumbs.db
26+
*~
27+
28+
# Testing
29+
.pytest_cache/
30+
.coverage
31+
htmlcov/
32+
.tox/
33+
.nox/
34+
35+
# mypy
36+
.mypy_cache/

0 commit comments

Comments
 (0)