|  | 
| 34 | 34 |       - name: Analyse with pylint | 
| 35 | 35 |         run: | | 
| 36 | 36 |           cd iriscasttools && pylint --recursive yes test iriscasttools | 
|  | 37 | +
 | 
|  | 38 | +  build_wheel: | 
|  | 39 | +    runs-on: ubuntu-20.04 | 
|  | 40 | +    strategy: | 
|  | 41 | +      matrix: | 
|  | 42 | +        python-version: ["3.x"] | 
|  | 43 | +    steps: | 
|  | 44 | +      - uses: actions/checkout@v3 | 
|  | 45 | +      - name: Set up Python ${{ matrix.python-version }} | 
|  | 46 | +        uses: actions/setup-python@v3 | 
|  | 47 | +        with: | 
|  | 48 | +          python-version: ${{ matrix.python-version }} | 
|  | 49 | +          cache: "pip" | 
|  | 50 | + | 
|  | 51 | +      - name: Install dependencies | 
|  | 52 | +        run: | | 
|  | 53 | +          python -m pip install --upgrade pip | 
|  | 54 | +          pip install setuptools wheel | 
|  | 55 | +
 | 
|  | 56 | +      - name: Build Wheels | 
|  | 57 | +        run: cd iriscasttools && python setup.py bdist_wheel | 
|  | 58 | + | 
|  | 59 | +      - uses: actions/upload-artifact@v3 | 
|  | 60 | +        with: | 
|  | 61 | +          name: iriscasttools | 
|  | 62 | +          path: iriscasttools/dist | 
|  | 63 | +          if-no-files-found: error | 
|  | 64 | + | 
|  | 65 | +  publish: | 
|  | 66 | +    runs-on: ubuntu-20.04 | 
|  | 67 | +    if: github.ref == 'refs/heads/master' && github.event_name == 'push' | 
|  | 68 | +    needs: | 
|  | 69 | +      - test_and_lint | 
|  | 70 | +      - build_wheel | 
|  | 71 | +    steps: | 
|  | 72 | +      - name: Checkout | 
|  | 73 | +        uses: actions/checkout@v3 | 
|  | 74 | +        with: | 
|  | 75 | +          fetch-depth: 0 | 
|  | 76 | + | 
|  | 77 | +      - name: Configure Git | 
|  | 78 | +        run: | | 
|  | 79 | +          git config user.name "$GITHUB_ACTOR" | 
|  | 80 | +          git config user.email "[email protected]" | 
|  | 81 | +
 | 
|  | 82 | +      - name: Download Wheels | 
|  | 83 | +        id: download | 
|  | 84 | +        uses: actions/download-artifact@v3 | 
|  | 85 | +        with: | 
|  | 86 | +          name: iriscasttools | 
|  | 87 | +          path: iriscasttools/dist | 
|  | 88 | + | 
|  | 89 | +      - name: Get Package Version | 
|  | 90 | +        id: version | 
|  | 91 | +        run: echo "version=$(python iriscasttools/setup.py --version)" >> $GITHUB_ENV | 
|  | 92 | + | 
|  | 93 | +      - name: Make Release | 
|  | 94 | +        uses: ncipollo/release-action@v1 | 
|  | 95 | +        with: | 
|  | 96 | +          artifacts: iriscasttools/dist/* | 
|  | 97 | +          tag: ${{ env.version }} | 
|  | 98 | +          name: iriscasttools-${{ env.version }} | 
|  | 99 | +          skipIfReleaseExists: true | 
|  | 100 | + | 
0 commit comments