From 3209b9bca51e689877289983225b6e8f527e1dfb Mon Sep 17 00:00:00 2001 From: laggykiller Date: Sun, 14 Jan 2024 23:02:37 +0800 Subject: [PATCH] Re-enable disabled ci actions --- .github/workflows/build.yml | 194 ++++++++++++++++++------------------ 1 file changed, 97 insertions(+), 97 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2adc40c..e53e4e6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,21 +20,21 @@ jobs: token: "${{ secrets.GITHUB_TOKEN }}" name: Release ${{ github.ref_name }} - # build-wheel: - # name: Build wheel - # needs: createrelease - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v3 - # with: - # submodules: recursive + build-wheel: + name: Build wheel + needs: createrelease + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive - # - name: Build SDist and wheel - # run: pipx run build + - name: Build SDist and wheel + run: pipx run build - # - uses: actions/upload-artifact@v3 - # with: - # path: dist/* + - uses: actions/upload-artifact@v3 + with: + path: dist/* build-binary: name: Build packages @@ -140,99 +140,99 @@ jobs: with: files: ${{ matrix.OUT_FILE_NAME }} - # build-docker: - # name: Build Docker image and push - # runs-on: ubuntu-latest + build-docker: + name: Build Docker image and push + runs-on: ubuntu-latest - # permissions: - # contents: read - # packages: write + permissions: + contents: read + packages: write - # steps: - # - name: Checkout repository - # uses: actions/checkout@v3 + steps: + - name: Checkout repository + uses: actions/checkout@v3 - # - name: Log in to Docker Hub - # uses: docker/login-action@v2 - # with: - # username: ${{ secrets.DOCKER_USERNAME }} - # password: ${{ secrets.DOCKER_PASSWORD }} + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - # - name: Login to GitHub Container Registry - # uses: docker/login-action@v2 - # with: - # registry: ghcr.io - # username: ${{ github.actor }} - # password: ${{ secrets.GITHUB_TOKEN }} + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - # - name: Extract metadata (tags, labels) for Docker (min-cli) - # id: meta_min_cli - # uses: docker/metadata-action@v4 - # with: - # images: | - # ${{ github.repository }} - # ghcr.io/${{ github.repository }} - # flavor: | - # suffix=-min-cli,onlatest=true + - name: Extract metadata (tags, labels) for Docker (min-cli) + id: meta_min_cli + uses: docker/metadata-action@v4 + with: + images: | + ${{ github.repository }} + ghcr.io/${{ github.repository }} + flavor: | + suffix=-min-cli,onlatest=true - # - name: Extract metadata (tags, labels) for Docker (min-gui) - # id: meta_min_gui - # uses: docker/metadata-action@v4 - # with: - # images: | - # ${{ github.repository }} - # ghcr.io/${{ github.repository }} - # flavor: | - # suffix=-min-gui,onlatest=true + - name: Extract metadata (tags, labels) for Docker (min-gui) + id: meta_min_gui + uses: docker/metadata-action@v4 + with: + images: | + ${{ github.repository }} + ghcr.io/${{ github.repository }} + flavor: | + suffix=-min-gui,onlatest=true - # - name: Extract metadata (tags, labels) for Docker (full) - # id: meta_full - # uses: docker/metadata-action@v4 - # with: - # images: | - # ${{ github.repository }} - # ghcr.io/${{ github.repository }} + - name: Extract metadata (tags, labels) for Docker (full) + id: meta_full + uses: docker/metadata-action@v4 + with: + images: | + ${{ github.repository }} + ghcr.io/${{ github.repository }} - # - name: Build and push Docker image (min-cli) - # uses: docker/build-push-action@v4 - # with: - # context: . - # push: true - # tags: ${{ steps.meta_min_cli.outputs.tags }} - # labels: ${{ steps.meta_min_cli.outputs.labels }} - # target: min-cli + - name: Build and push Docker image (min-cli) + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ steps.meta_min_cli.outputs.tags }} + labels: ${{ steps.meta_min_cli.outputs.labels }} + target: min-cli - # - name: Build and push Docker image (min-gui) - # uses: docker/build-push-action@v4 - # with: - # context: . - # push: true - # tags: ${{ steps.meta_min_gui.outputs.tags }} - # labels: ${{ steps.meta_min_gui.outputs.labels }} - # target: min-gui + - name: Build and push Docker image (min-gui) + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ steps.meta_min_gui.outputs.tags }} + labels: ${{ steps.meta_min_gui.outputs.labels }} + target: min-gui - # - name: Build and push Docker image (full) - # uses: docker/build-push-action@v4 - # with: - # context: . - # push: true - # tags: ${{ steps.meta_full.outputs.tags }} - # labels: ${{ steps.meta_full.outputs.labels }} - # target: full + - name: Build and push Docker image (full) + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ steps.meta_full.outputs.tags }} + labels: ${{ steps.meta_full.outputs.labels }} + target: full - # upload-pypi: - # name: Upload to pypi - # needs: [build-wheel, build-binary] - # runs-on: ubuntu-latest - # steps: - # - uses: actions/download-artifact@v3 - # with: - # # unpacks default artifact into dist/ - # # if `name: artifact` is omitted, the action will create extra parent dir - # name: artifact - # path: dist + upload-pypi: + name: Upload to pypi + needs: [build-wheel, build-binary] + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v3 + with: + # unpacks default artifact into dist/ + # if `name: artifact` is omitted, the action will create extra parent dir + name: artifact + path: dist - # - uses: pypa/gh-action-pypi-publish@v1.5.0 - # with: - # user: __token__ - # password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + - uses: pypa/gh-action-pypi-publish@v1.5.0 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file