From ff1a620e89759150583fde021e26698d2defcded Mon Sep 17 00:00:00 2001 From: Max Peintner Date: Mon, 14 Jul 2025 11:40:47 +0200 Subject: [PATCH] make target --- .github/workflows/compile.yml | 155 +++++++++++++++------------------- 1 file changed, 70 insertions(+), 85 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 7b64427a18..98ee854370 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -29,98 +29,83 @@ jobs: matrix: goos: [linux, darwin, windows] goarch: [amd64, arm64] - + steps: - - - uses: actions/checkout@v4 - - - uses: actions/cache/restore@v4 - timeout-minutes: 1 - name: restore console - with: - path: ${{ inputs.console_cache_path }} - key: ${{ inputs.console_cache_key }} - fail-on-cache-miss: true - - - uses: actions/cache/restore@v4 - timeout-minutes: 1 - name: restore core - with: - path: ${{ inputs.core_cache_path }} - key: ${{ inputs.core_cache_key }} - fail-on-cache-miss: true - - - uses: actions/setup-go@v5 - with: - go-version-file: 'go.mod' - - - name: compile - timeout-minutes: 5 - run: | - GOOS="${{matrix.goos}}" \ - GOARCH="${{matrix.goarch}}" \ - VERSION="${{ inputs.version }}" \ - COMMIT_SHA="${{ github.sha }}" \ - make compile_pipeline - - - name: create folder - run: | - mkdir zitadel-${{ matrix.goos }}-${{ matrix.goarch }} - mv zitadel zitadel-${{ matrix.goos }}-${{ matrix.goarch }}/ - cp LICENSE zitadel-${{ matrix.goos }}-${{ matrix.goarch }}/ - cp README.md zitadel-${{ matrix.goos }}-${{ matrix.goarch }}/ - tar -czvf zitadel-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz zitadel-${{ matrix.goos }}-${{ matrix.goarch }} - - - uses: actions/upload-artifact@v4 - with: - name: zitadel-${{ matrix.goos }}-${{ matrix.goarch }} - path: zitadel-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz + - uses: actions/checkout@v4 + - uses: actions/cache/restore@v4 + timeout-minutes: 1 + name: restore console + with: + path: ${{ inputs.console_cache_path }} + key: ${{ inputs.console_cache_key }} + fail-on-cache-miss: true + - uses: actions/cache/restore@v4 + timeout-minutes: 1 + name: restore core + with: + path: ${{ inputs.core_cache_path }} + key: ${{ inputs.core_cache_key }} + fail-on-cache-miss: true + - uses: actions/setup-go@v5 + with: + go-version-file: "go.mod" + - name: compile + timeout-minutes: 5 + run: | + GOOS="${{matrix.goos}}" \ + GOARCH="${{matrix.goarch}}" \ + VERSION="${{ inputs.version }}" \ + COMMIT_SHA="${{ github.sha }}" \ + make compile_pipeline + - name: create folder + run: | + mkdir zitadel-${{ matrix.goos }}-${{ matrix.goarch }} + mv zitadel zitadel-${{ matrix.goos }}-${{ matrix.goarch }}/ + cp LICENSE zitadel-${{ matrix.goos }}-${{ matrix.goarch }}/ + cp README.md zitadel-${{ matrix.goos }}-${{ matrix.goarch }}/ + tar -czvf zitadel-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz zitadel-${{ matrix.goos }}-${{ matrix.goarch }} + - uses: actions/upload-artifact@v4 + with: + name: zitadel-${{ matrix.goos }}-${{ matrix.goarch }} + path: zitadel-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz login: runs-on: ubuntu-latest steps: - - - uses: actions/checkout@v4 - - - uses: depot/setup-action@v1 - with: - oidc: true - - - run: make login_standalone_out - env: - # latest if branch is main, otherwise image version which is the pull request number - LOGIN_BAKE_CLI: depot bake - DEPOT_PROJECT_ID: w47wkxzdtw - NODE_VERSION: ${{ inputs.node_version }} - - - name: move files - run: | - cp login/LICENSE login/apps/login/standalone/ - cp login/README.md login/apps/login/standalone/ - tar -czvf login.tar.gz -C login/apps/login/standalone . - - - uses: actions/upload-artifact@v4 - with: - name: login - path: login.tar.gz + - uses: actions/checkout@v4 + - uses: depot/setup-action@v1 + with: + oidc: true + - run: make login_standalone_out + working-directory: login + env: + # latest if branch is main, otherwise image version which is the pull request number + LOGIN_BAKE_CLI: depot bake + DEPOT_PROJECT_ID: w47wkxzdtw + NODE_VERSION: ${{ inputs.node_version }} + - name: move files + run: | + cp login/LICENSE login/apps/login/standalone/ + cp login/README.md login/apps/login/standalone/ + tar -czvf login.tar.gz -C login/apps/login/standalone . + - uses: actions/upload-artifact@v4 + with: + name: login + path: login.tar.gz checksums: runs-on: ubuntu-latest needs: [executable, login] steps: - - - uses: actions/download-artifact@v4 - with: - path: executables - - - name: move files one folder up - run: mv */*.tar.gz . && find . -type d -empty -delete - working-directory: executables - - - run: sha256sum * > checksums.txt - working-directory: executables - - - uses: actions/upload-artifact@v4 - with: - name: checksums.txt - path: executables/checksums.txt + - uses: actions/download-artifact@v4 + with: + path: executables + - name: move files one folder up + run: mv */*.tar.gz . && find . -type d -empty -delete + working-directory: executables + - run: sha256sum * > checksums.txt + working-directory: executables + - uses: actions/upload-artifact@v4 + with: + name: checksums.txt + path: executables/checksums.txt