update to 0.5.20 #66
This file contains hidden or 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
| # Build source RPM and RPM | |
| --- | |
| name: Build source RPM and RPM | |
| on: | |
| # Allows manual workflow run (must in default branch to work) | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - 'protonplus-next/**' | |
| env: | |
| DNF_CMD: > | |
| dnf install | |
| --assumeyes | |
| --nodocs | |
| --setopt=install_weak_deps=False | |
| jobs: | |
| build-srpm: | |
| name: Build source RPM | |
| runs-on: ubuntu-24.04 | |
| container: | |
| image: fedora:latest | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| # install git to actions/checkout proper work | |
| ${DNF_CMD} \ | |
| git \ | |
| make | |
| # add workdir to safe dir | |
| git config \ | |
| --global \ | |
| --add safe.directory "${GITHUB_WORKSPACE}" | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| with: | |
| # fetch all history to make changelog | |
| fetch-depth: 0 | |
| - name: Build the source RPM | |
| run: | | |
| make srpm | |
| - name: Upload source RPM to github artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: SRPM | |
| include-hidden-files: true | |
| retention-days: 1 | |
| path: ${{ github.workspace }} | |
| build-rpm: | |
| name: Build RPM | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - build-srpm | |
| container: | |
| image: fedora:latest | |
| volumes: | |
| # overlay is not supported over overlayfs | |
| - non_overlay_dir:/var/lib/containers | |
| # mock inside docker need this option | |
| options: --privileged | |
| steps: | |
| - name: Download source RPM from github artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: SRPM | |
| - name: Install dependencies | |
| run: | | |
| ${DNF_CMD} \ | |
| make | |
| - name: Build the RPM | |
| run: | | |
| make rpm | |
| - name: Upload source RPM to github artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: RPM | |
| retention-days: 1 | |
| path: ${{ github.workspace }}/output/rpm | |
| # upload-srpm: | |
| # name: Upload source RPM to Fedora Copr | |
| # runs-on: ubuntu-24.04 | |
| # needs: | |
| # - build-srpm | |
| # - build-rpm | |
| # if: ${{ needs.build-rpm.result == 'success' }} | |
| # container: | |
| # image: fedora:latest | |
| # | |
| # steps: | |
| # - name: Download source RPM from github artifacts | |
| # uses: actions/download-artifact@v4 | |
| # with: | |
| # name: SRPM | |
| # | |
| # - name: Install dependencies | |
| # run: | | |
| # ${DNF_CMD} \ | |
| # copr-cli | |
| # | |
| # - name: Install API token for copr-cli | |
| # env: | |
| # API_TOKEN_CONTENT: ${{ secrets.COPR_API_TOKEN }} | |
| # run: | | |
| # mkdir -p "${HOME}/.config" | |
| # echo "${API_TOKEN_CONTENT}" > "${HOME}/.config/copr" | |
| # | |
| # - name: Submit the source RPM | |
| # run: | | |
| # copr build protonplus output/srpm/*.src.rpm | |
| # clean-artifacts: | |
| # name: Clean artifacts | |
| # runs-on: ubuntu-24.04 | |
| # needs: | |
| # - build-srpm | |
| # - build-rpm | |
| # - upload-srpm | |
| # if: ${{ always() && needs.build-rpm.result == 'success' }} | |
| # | |
| # steps: | |
| # - name: Clean source RPM from github artifacts | |
| # uses: geekyeggo/delete-artifact@v5 | |
| # with: | |
| # name: RPM |