v3.4.1 #10
Workflow file for this run
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
| name: Release | |
| on: | |
| release: | |
| types: | |
| - created | |
| jobs: | |
| build-pypi: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build twine wheel setuptools | |
| - name: Build package | |
| run: | | |
| python -m build | |
| - name: Check package | |
| run: | | |
| python -m twine check dist/* | |
| - name: Upload to PyPI | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
| run: | | |
| python -m twine upload dist/* --skip-existing | |
| build-linux-binary: | |
| strategy: | |
| matrix: | |
| ubuntu-version: ["22.04", "24.04"] | |
| runs-on: ubuntu-${{ matrix.ubuntu-version }} | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential | |
| - name: Build binary using install script | |
| env: | |
| UBUNTU_VERSION: ${{ matrix.ubuntu-version }} | |
| run: | | |
| bash script/install.sh | |
| - name: Verify binary | |
| run: | | |
| ls -lh ./dist/diffmanifests-linux-ubuntu${{ matrix.ubuntu-version }} | |
| file ./dist/diffmanifests-linux-ubuntu${{ matrix.ubuntu-version }} | |
| - name: Test binary | |
| run: | | |
| ./dist/diffmanifests-linux-ubuntu${{ matrix.ubuntu-version }} --help | |
| - name: Upload binary artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: diffmanifests-linux-ubuntu${{ matrix.ubuntu-version }} | |
| path: dist/diffmanifests-linux-ubuntu${{ matrix.ubuntu-version }} | |
| create-release: | |
| needs: [build-pypi, build-linux-binary] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| - name: Get version | |
| id: get_version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| diffmanifests-linux-ubuntu22.04/diffmanifests-linux-ubuntu22.04 | |
| diffmanifests-linux-ubuntu24.04/diffmanifests-linux-ubuntu24.04 | |
| name: Release ${{ steps.get_version.outputs.VERSION }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.CRAFTSLAB_TOKEN }} |