From 411361b53e78d7735a5ac8e4b8ad31462ae708b3 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 8 Feb 2025 19:03:45 +0100 Subject: [PATCH] feat(ci): add desktop release to GitHub actions --- .github/workflows/release-docker.yml | 32 --------------- .github/workflows/release.yml | 59 ++++++++++++++++++++++++++++ devenv.nix | 1 + 3 files changed, 60 insertions(+), 32 deletions(-) delete mode 100644 .github/workflows/release-docker.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release-docker.yml b/.github/workflows/release-docker.yml deleted file mode 100644 index 53fe9a6f3..000000000 --- a/.github/workflows/release-docker.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: release/docker - -on: - push: - branches: - - main - -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Git describe - id: ghd - uses: proudust/gh-describe@v2 - - name: Login to GHCR - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Build and push - uses: docker/build-push-action@v6 - with: - platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8 - push: true - tags: ghcr.io/go-vikunja/vikunja:unstable - build-args: | - RELEASE_VERSION=${{ steps.ghd.outputs.describe }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..c7a064aa4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,59 @@ +name: release + +on: + push: + branches: + - main + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Git describe + id: ghd + uses: proudust/gh-describe@v2 + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push + uses: docker/build-push-action@v6 + with: + platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8 + push: true + tags: ghcr.io/go-vikunja/vikunja:unstable + build-args: | + RELEASE_VERSION=${{ steps.ghd.outputs.describe }} + desktop: + runs-on: ubuntu-latest + container: + image: electronuserland/builder:wine + + steps: + - uses: actions/checkout@v3 + - name: Set version + id: version + run: | + if [ "${{ github.ref_type }}" = "tag" ]; then + VERSION="${{ github.ref_name}}" + else + VERSION="unstable" + fi + echo version=$VERSION >> "$GITHUB_OUTPUT" + + - name: Build desktop app + working-directory: desktop + run: | + wget "https://dl.vikunja.io/frontend/vikunja-frontend-${{ steps.version.outputs.version }}.zip" + unzip "vikunja-frontend-${{ steps.version.outputs.version }}.zip" -d frontend + sed -i 's/\/api\/v1//g' frontend/index.html + ./bumpp.sh + npm install -g corepack && corepack enable && pnpm config set store-dir .cache/pnpm + pnpm install --fetch-timeout 100000 + pnpm dist --linux --windows diff --git a/devenv.nix b/devenv.nix index e1a9fdda0..1e4f0deee 100644 --- a/devenv.nix +++ b/devenv.nix @@ -10,6 +10,7 @@ in { packages = with pkgs-unstable; [ # General tools git-cliff + actionlint # API tools golangci-lint mage # Desktop