-
-
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.
now an argument to the script
- Loading branch information
Showing
2 changed files
with
29 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# This workflow will generate a ALPHA release distribution and upload it to PyPI | ||
|
||
# This workflow will generate an ALPHA release distribution and upload it to PyPI | ||
name: Publish Alpha Build | ||
on: | ||
push: | ||
|
@@ -25,19 +24,25 @@ jobs: | |
- uses: actions/checkout@v2 | ||
with: | ||
ref: dev | ||
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | ||
fetch-depth: 0 # to avoid errors pushing refs to the destination repository | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install Build Tools | ||
run: | | ||
python -m pip install build wheel | ||
- name: Determine version bump | ||
id: version_bump | ||
run: | | ||
LABELS=$(echo "${{ github.event.pull_request.labels[*].name }}" | tr ' ' '\n') | ||
LABELS="" | ||
if [ "${{ github.event_name }}" == "pull_request" ]; then | ||
LABELS=$(echo "${{ github.event.pull_request.labels[*].name }}" | tr ' ' '\n') | ||
fi | ||
MAJOR=0 | ||
MINOR=0 | ||
BUILD=0 | ||
|
@@ -64,22 +69,25 @@ jobs: | |
- name: Update version in version.py | ||
run: | | ||
python scripts/update_version.py ${{ steps.version_bump.outputs.part }} | ||
python scripts/update_version.py ${{ steps.version_bump.outputs.part }} --version-file $GITHUB_WORKSPACE/tutubo/version.py | ||
- name: "Generate release changelog" | ||
uses: heinrichreimer/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
maxIssues: 50 | ||
id: changelog | ||
|
||
- name: Commit to dev | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Increment Version | ||
branch: dev | ||
|
||
- name: version | ||
run: echo "::set-output name=version::$(python setup.py --version)" | ||
id: version | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
|
@@ -94,9 +102,11 @@ jobs: | |
draft: false | ||
prerelease: true | ||
commitish: dev | ||
|
||
- name: Build Distribution Packages | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
|
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