From 9092a5df9ceab9db5e94706c64ad88b3bea9f3e7 Mon Sep 17 00:00:00 2001 From: Ubax Date: Fri, 15 Mar 2024 13:20:03 +0100 Subject: [PATCH] feat: Adds task-6 solution --- .github/workflows/task-6.yaml | 69 +++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/task-6.yaml diff --git a/.github/workflows/task-6.yaml b/.github/workflows/task-6.yaml new file mode 100644 index 0000000..5215c83 --- /dev/null +++ b/.github/workflows/task-6.yaml @@ -0,0 +1,69 @@ +name: task-6-workflow +run-name: Task 6 workflow +on: + push: + tags: + - desktop-app-** + +permissions: + contents: write + +jobs: + build-application: + defaults: + run: + working-directory: desktop-app + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest, macos-14] + runs-on: ${{ matrix.os }} + outputs: + build-artifact: ${{ steps.archive-build.outputs.artifact }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Use Node.js LTS + uses: actions/setup-node@v4 + with: + node-version: "lts/*" + cache: "npm" + cache-dependency-path: desktop-app + - name: Install dependencies + run: npm ci + - name: Build the app + run: npm run make + - name: List files + run: ls + - name: archive build + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.os == 'macos-14' && 'macos-arm' || matrix.os }}-release + path: desktop-app/out/calculator-* + retention-days: 1 + + create-release: + needs: deploy-website + runs-on: ubuntu-latest + steps: + - name: Download builds + uses: actions/download-artifact@v4 + with: + path: release + - name: List files + run: ls -Rl + - name: Zip releases + run: | + zip -r macos-apple-silicon.zip release/macos-arm-release + zip -r macos-intel.zip release/macos-latest-release + zip -r linux.zip release/ubuntu-latest-release + zip -r windows.zip release/windows-latest-release + - name: List files + run: ls -Rl + - name: Create release + uses: softprops/action-gh-release@v2 + with: + files: | + macos-apple-silicon.zip + macos-intel.zip + linux.zip + windows.zip \ No newline at end of file