Skip to content

Commit 2705c70

Browse files
committed
Release package to pypi
1 parent f7fe16e commit 2705c70

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

.github/workflows/build.yaml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on: push
44

55
jobs:
66
build:
7+
name: >-
8+
Build and Package 📦
79
if: ${{ startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/release' }}
810
strategy:
911
matrix:
@@ -76,16 +78,16 @@ jobs:
7678
build/*.app/**/*
7779
overwrite: true
7880

79-
publish-to-testpypi:
80-
name: Publish Python 🐍 distribution 📦 to TestPyPI
81+
publish-to-pypi:
82+
name: >-
83+
Publish Python 🐍 distribution 📦 to PyPI
84+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
8185
needs:
8286
- build
8387
runs-on: ubuntu-latest
84-
8588
environment:
86-
name: testpypi
87-
url: https://test.pypi.org/p/ytm2spt
88-
89+
name: pypi
90+
url: https://pypi.org/p/ytm2spt
8991
permissions:
9092
id-token: write # IMPORTANT: mandatory for trusted publishing
9193

@@ -95,15 +97,15 @@ jobs:
9597
with:
9698
name: python-package-distributions
9799
path: dist/
98-
- name: Publish distribution 📦 to TestPyPI
100+
- name: Publish distribution 📦 to PyPI
99101
uses: pypa/gh-action-pypi-publish@release/v1
100-
with:
101-
repository-url: https://test.pypi.org/legacy/
102-
102+
103103
release:
104+
name: >-
105+
Create a GitHub Release 🚀
104106
needs:
105107
- build
106-
- publish-to-testpypi
108+
- publish-to-pypi
107109
runs-on: ubuntu-latest
108110

109111
permissions:
@@ -134,25 +136,25 @@ jobs:
134136
- name: Zip Windows Executable
135137
run: |
136138
cd *windows-build
137-
zip -9 ytm2spt-${{ github.ref_name }}-windows.zip *-installer.exe
139+
zip -9 ytm2spt-windows.zip *-installer.exe
138140
139141
- name: Zip Linux Executable
140142
run: |
141143
cd *linux-build
142-
tar -cavf ytm2spt-${{ github.ref_name }}-linux.tar.gz *.bin
144+
tar -cavf ytm2spt-linux.tar.gz *.bin
143145
144146
- name: Zip MacOS Executable
145147
run: |
146148
cd *macos-build
147-
zip -r -9 ytm2spt-${{ github.ref_name }}-macos.zip *.app
149+
zip -r -9 ytm2spt-macos.zip *.app
148150
149151
- name: GitHub Release
150152
uses: softprops/action-gh-release@v2
151153
with:
152154
draft: true
153155
generate_release_notes: true
154156
files: |
155-
*build/ytm2spt-${{ github.ref_name }}-windows.zip
156-
*build/ytm2spt-${{ github.ref_name }}-linux.tar.gz
157-
*build/ytm2spt-${{ github.ref_name }}-macos.zip
157+
*build/ytm2spt-windows.zip
158+
*build/ytm2spt-linux.tar.gz
159+
*build/ytm2spt-macos.zip
158160
dist/*

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "ytm2spt"
3-
version = "1.0.3-rc1"
3+
version = "1.1.0"
44
authors = [
55
{ name="Abhishek M J", email="[email protected]" },
66
]

0 commit comments

Comments
 (0)