From 8d3226b426a9409892cb3c4810f1ad5e55e7b378 Mon Sep 17 00:00:00 2001 From: Mungai Njoroge Date: Mon, 26 Feb 2024 00:51:20 +0300 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 184 +++++++++++++++++----------------- 1 file changed, 92 insertions(+), 92 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f0ed6b2..58554c29 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,98 +33,98 @@ on: - false jobs: - build: - strategy: - matrix: - os: [ubuntu-20.04, windows-2019] - runs-on: ${{ matrix.os }} - name: Create binary on ${{ matrix.os }} - steps: - - name: Clone client - uses: actions/checkout@v3 - - name: Setup Node 16 - uses: actions/setup-node@v3 - with: - node-version: 16.x - - name: Install yarn - run: | - npm install -g yarn - - name: Clone client - run: | - git clone https://github.com/cwilvx/swingmusic-client.git - - name: Install dependencies & Build client - run: | - cd swingmusic-client - yarn install - yarn build --outDir ../client - cd .. - - name: Install Python 3.10.11 - uses: actions/setup-python@v2 - with: - python-version: "3.10.11" - - name: Install Poetry - run: | - pip install poetry - - name: Install dependencies - run: | - python -m poetry install - - name: Build server - run: | - python -m poetry run python manage.py --build - env: - SWINGMUSIC_APP_VERSION: ${{ inputs.tag }} - - name: Verify Linux build success - if: matrix.os == 'ubuntu-20.04' - run: | - if [ ! -f "./dist/swingmusic" ]; then - echo "Build failed" - exit 1 - fi - - name: Verify Windows build success - if: matrix.os == 'windows-2019' - run: | - if (-not (Test-Path "./dist/swingmusic.exe")) { - Write-Host "Build failed" - exit 1 - } - - name: Upload Linux binary - if: matrix.os == 'ubuntu-20.04' - uses: actions/upload-artifact@v3 - with: - name: linux - path: dist/swingmusic - retention-days: 1 - - name: Upload Windows binary - if: matrix.os == 'windows-2019' - uses: actions/upload-artifact@v3 - with: - name: win32 - path: dist/swingmusic.exe - retention-days: 1 + # build: + # strategy: + # matrix: + # os: [ubuntu-20.04, windows-2019] + # runs-on: ${{ matrix.os }} + # name: Create binary on ${{ matrix.os }} + # steps: + # - name: Clone client + # uses: actions/checkout@v3 + # - name: Setup Node 16 + # uses: actions/setup-node@v3 + # with: + # node-version: 16.x + # - name: Install yarn + # run: | + # npm install -g yarn + # - name: Clone client + # run: | + # git clone https://github.com/cwilvx/swingmusic-client.git + # - name: Install dependencies & Build client + # run: | + # cd swingmusic-client + # yarn install + # yarn build --outDir ../client + # cd .. + # - name: Install Python 3.10.11 + # uses: actions/setup-python@v2 + # with: + # python-version: "3.10.11" + # - name: Install Poetry + # run: | + # pip install poetry + # - name: Install dependencies + # run: | + # python -m poetry install + # - name: Build server + # run: | + # python -m poetry run python manage.py --build + # env: + # SWINGMUSIC_APP_VERSION: ${{ inputs.tag }} + # - name: Verify Linux build success + # if: matrix.os == 'ubuntu-20.04' + # run: | + # if [ ! -f "./dist/swingmusic" ]; then + # echo "Build failed" + # exit 1 + # fi + # - name: Verify Windows build success + # if: matrix.os == 'windows-2019' + # run: | + # if (-not (Test-Path "./dist/swingmusic.exe")) { + # Write-Host "Build failed" + # exit 1 + # } + # - name: Upload Linux binary + # if: matrix.os == 'ubuntu-20.04' + # uses: actions/upload-artifact@v3 + # with: + # name: linux + # path: dist/swingmusic + # retention-days: 1 + # - name: Upload Windows binary + # if: matrix.os == 'windows-2019' + # uses: actions/upload-artifact@v3 + # with: + # name: win32 + # path: dist/swingmusic.exe + # retention-days: 1 - release: - name: Create New Release - runs-on: ubuntu-latest - needs: build - permissions: write-all - steps: - - name: Checkout into repo - uses: actions/checkout@v3 - - name: Download all binaries - uses: actions/download-artifact@v3 - - name: Upload binaries to GitHub Release - uses: ncipollo/release-action@v1 - with: - allowUpdates: true - artifacts: "./linux/swingmusic, ./win32/swingmusic.exe" - token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ format('v{0}',inputs.tag) }} - commit: ${{ github.sha }} - draft: ${{ inputs.is_draft }} - artifactErrorsFailBuild: true - name: ${{ format('v{0}',inputs.tag) }} - bodyFile: .github/changelog.md - makeLatest: ${{ inputs.is_latest }} + # release: + # name: Create New Release + # runs-on: ubuntu-latest + # needs: build + # permissions: write-all + # steps: + # - name: Checkout into repo + # uses: actions/checkout@v3 + # - name: Download all binaries + # uses: actions/download-artifact@v3 + # - name: Upload binaries to GitHub Release + # uses: ncipollo/release-action@v1 + # with: + # allowUpdates: true + # artifacts: "./linux/swingmusic, ./win32/swingmusic.exe" + # token: ${{ secrets.GITHUB_TOKEN }} + # tag: ${{ format('v{0}',inputs.tag) }} + # commit: ${{ github.sha }} + # draft: ${{ inputs.is_draft }} + # artifactErrorsFailBuild: true + # name: ${{ format('v{0}',inputs.tag) }} + # bodyFile: .github/changelog.md + # makeLatest: ${{ inputs.is_latest }} docker: name: Build and push Docker image runs-on: ubuntu-latest @@ -169,6 +169,6 @@ jobs: tags: ghcr.io/${{github.repository}}:${{format('v{0}', inputs.tag)}}, ${{env.LATEST_TAG}} labels: org.opencontainers.image.title=Docker build-args: | - --provenance=false, client_tag=v${{inputs.tag}} + client_tag=v${{inputs.tag}} env: LATEST_TAG: ${{ inputs.is_latest == 'true' && format('ghcr.io/{0}:latest', github.repository) || '' }}