fix: bump version (#54) #16
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
name: Build eggs | |
on: | |
push: | |
branches: [deluge-2.1.1] | |
jobs: | |
release: | |
name: Create Github Release | |
# if: contains(github.ref, 'tags/v') | |
# needs: [test] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create Release | |
id: create_release | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Deluge 2.1.1 | |
draft: true | |
prerelease: false | |
- name: Output Release URL File | |
run: | | |
echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt | |
pwd | |
ls -alh | |
- name: Save Release URL File for publish | |
uses: actions/[email protected] | |
with: | |
name: release_url | |
path: release_url.txt | |
build: | |
runs-on: ubuntu-latest | |
needs: [release] | |
strategy: | |
# By default, GitHub will maximize the number of jobs run in parallel | |
# depending on the available runners on GitHub-hosted virtual machines. | |
# max-parallel: 8 | |
fail-fast: false | |
matrix: | |
include: | |
- python-version: "3.7" | |
- python-version: "3.8" | |
- python-version: "3.9" | |
- python-version: "3.10" | |
- python-version: "3.11" | |
- python-version: "3.12" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/checkout@v1 | |
- name: Load Release URL File from release job | |
uses: actions/[email protected] | |
with: | |
name: release_url | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Python build | |
run: | | |
echo "Python ${{ matrix.python-version }}" | |
python --version | |
PYTHON_VERSION=${{ matrix.python-version }} ./build-all.sh | |
ls -alh out | |
ls -alh out/dist | |
- name: Get md5sum | |
run: | | |
echo "::set-output name=FILEHASH::$(md5sum ./out/dist/Telegramer-2.1.1.0-py${{ matrix.python-version }}.egg | cut -d ' ' -f 1)" | |
id: filehash | |
# - name: Create Release | |
# id: create_release | |
# uses: actions/create-release@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
# with: | |
# body: "**MD5:** `${{ steps.filehash.outputs.FILEHASH }}`" | |
# tag_name: v2.1.1 | |
# release_name: Deluge 2.1.1 | |
# draft: true | |
# prerelease: true | |
- name: Get Release File Name & Upload URL | |
id: get_release_info | |
run: | | |
pwd | |
ls -alh | |
echo ::set-output name=file_name::${REPOSITORY_NAME##*/}-${TAG_REF_NAME##*/v} # RepositoryName-v1.0.0 | |
value=`cat release_url.txt` | |
echo ::set-output name=upload_url::$value | |
env: | |
TAG_REF_NAME: ${{ github.ref }} | |
REPOSITORY_NAME: ${{ github.repository }} | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_release_info.outputs.upload_url }} | |
asset_path: ./out/dist/Telegramer-2.1.1.0-py${{ matrix.python-version }}.egg | |
asset_name: 'Telegramer-2.1.1.0-py${{ matrix.python-version }}.egg' | |
asset_content_type: application/octet-stream | |
# - name: Upload Release Asset | |
# id: upload-release-asset | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
# with: | |
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
# asset_path: ./out/dist/Telegramer-2.1.1.0-py${{ matrix.python-version }}.egg | |
# asset_name: 'Telegramer-2.1.1.0-py${{ matrix.python-version }}.egg' | |
# asset_content_type: application/octet-stream |