Skip to content

Commit

Permalink
build upload test
Browse files Browse the repository at this point in the history
  • Loading branch information
richtja committed Jul 11, 2024
1 parent 9e81398 commit c9668af
Showing 1 changed file with 7 additions and 76 deletions.
83 changes: 7 additions & 76 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,13 @@ on:
default: 'avocado-framework'

jobs:

release:
name: Release pipeline
runs-on: ubuntu-latest
container:
image: fedora:34
env:
VERSION: ${{ github.event.inputs.version }}
DEVEL_NAME: ${{ github.event.inputs.devel_name }}
DEVEL_MAIL: ${{ github.event.inputs.devel_mail }}
PYTHON: /usr/bin/python3
TOKEN_RTD: ${{ secrets.RTD_TOKEN }}
URL: "https://readthedocs.org/api/v3/projects/${{ github.event.inputs.rtd_project }}"
build-and-publish-eggs:
name: Build eggs and publish them
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.11.1]
fail-fast: false

steps:
- name: Generate token
Expand All @@ -47,69 +41,6 @@ jobs:
app_id: ${{ secrets.MR_AVOCADO_ID }}
installation_id: ${{ secrets.MR_AVOCADO_INSTALLATION_ID }}
private_key: ${{ secrets.MR_AVOCADO_PRIVATE_KEY }}
- name: install required packages
run: dnf -y install rpmdevtools git python3-pip make
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Update VERSION files and python-avocado.spec
run: |
make -f Makefile.gh propagate-version
make -f Makefile.gh release-update-spec
- name: Commit files and tag
run: |
git config --global --add safe.directory `pwd`
git config --local user.email "${{ github.event.inputs.devel_mail }}"
git config --local user.name "${{ github.event.inputs.devel_name }}"
make -f Makefile.gh release-commit-tag
- name: Push changes to github
uses: ad-m/github-push-action@master
with:
github_token: ${{ steps.generate_token.outputs.token }}
branch: ${{ github.ref }}
- name: Build wheel
run: make -f Makefile.gh build-wheel check-wheel
- name: Save wheel as artifact
uses: actions/upload-artifact@v4
with:
name: wheel
path: ${{github.workspace}}/PYPI_UPLOAD/
retention-days: 3
- name: Build documentation readthedocs
run: |
make -f Makefile.gh build-update-readthedocs
- run: echo "In a few minutes the release documentation will be available in https://${{ github.event.inputs.rtd_project }}.readthedocs.io/en/${{ github.event.inputs.version }}/"

publish-to-pypi:
name: Publish Avocado to PyPI
needs:
- release
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/avocado-framework
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the wheels
uses: actions/download-artifact@v4
with:
name: wheel
path: dist/
- name: Publish avocado to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

build-and-publish-eggs:
name: Build eggs and publish them
runs-on: ubuntu-20.04
needs: release
strategy:
matrix:
python-version: [3.8.16, 3.9.16, 3.10.9, 3.11.1, 3.12.0]
fail-fast: false

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
Expand Down

0 comments on commit c9668af

Please sign in to comment.