feat(ci): update workflow for Windows and add Ubuntu publishing
The workflow has been modified to focus on building and publishing Windows installers, with the previous matrix strategy removed. Additionally, a new job for building and publishing Ubuntu AppImages has been added, ensuring that the necessary dependencies and steps are included for a successful build. - Renamed job to reflect Windows installer publishing - Added Ubuntu AppImage publishing workflow - Simplified job structure by removing matrix strategy
This commit is contained in:
@@ -5,7 +5,8 @@ on:
|
|||||||
types: [published]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-tauri:
|
publish-windows:
|
||||||
|
name: Build and publish Windows installer
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
environment: production
|
environment: production
|
||||||
@@ -30,25 +31,7 @@ jobs:
|
|||||||
run:
|
run:
|
||||||
working-directory: GitLite
|
working-directory: GitLite
|
||||||
|
|
||||||
strategy:
|
runs-on: windows-latest
|
||||||
fail-fast: false
|
|
||||||
max-parallel: 1
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
# - platform: 'macos-latest'
|
|
||||||
# args: '--target aarch64-apple-darwin'
|
|
||||||
# - platform: 'macos-latest'
|
|
||||||
# args: '--target x86_64-apple-darwin'
|
|
||||||
- platform: "windows-latest"
|
|
||||||
bundles: "nsis"
|
|
||||||
updater_platform: "windows-x86_64"
|
|
||||||
no_strip: ""
|
|
||||||
- platform: "ubuntu-22.04"
|
|
||||||
bundles: "appimage"
|
|
||||||
updater_platform: "linux-x86_64"
|
|
||||||
no_strip: "1"
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# cicd_tool/main.py expects the repo at <workspace>/GitLite, so check out there.
|
# cicd_tool/main.py expects the repo at <workspace>/GitLite, so check out there.
|
||||||
@@ -56,25 +39,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: GitLite
|
path: GitLite
|
||||||
|
|
||||||
- name: install dependencies (ubuntu only)
|
|
||||||
if: matrix.platform == 'ubuntu-22.04'
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y build-essential curl wget file libssl-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf libxdo-dev libfuse2
|
|
||||||
|
|
||||||
- name: setup node
|
- name: setup node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: lts/*
|
node-version: lts/*
|
||||||
|
|
||||||
- name: Install uv
|
|
||||||
if: matrix.platform == 'ubuntu-22.04'
|
|
||||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
|
|
||||||
|
|
||||||
- name: install rust toolchain
|
|
||||||
if: matrix.platform == 'ubuntu-22.04'
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: install frontend dependencies
|
- name: install frontend dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
@@ -88,7 +57,6 @@ jobs:
|
|||||||
node -e "const fs=require('fs'); const path='src-tauri/tauri.conf.json'; const config=JSON.parse(fs.readFileSync(path,'utf8')); config.version=process.env.RELEASE_VERSION; fs.writeFileSync(path, JSON.stringify(config,null,2)+'\n');"
|
node -e "const fs=require('fs'); const path='src-tauri/tauri.conf.json'; const config=JSON.parse(fs.readFileSync(path,'utf8')); config.version=process.env.RELEASE_VERSION; fs.writeFileSync(path, JSON.stringify(config,null,2)+'\n');"
|
||||||
|
|
||||||
- name: Commit and Push Changes
|
- name: Commit and Push Changes
|
||||||
if: matrix.platform == 'windows-latest'
|
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
git config user.name '${{ vars.USERNAME_GIT }}'
|
git config user.name '${{ vars.USERNAME_GIT }}'
|
||||||
@@ -139,21 +107,22 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD}}
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD}}
|
||||||
NO_STRIP: ${{ matrix.no_strip }}
|
NO_STRIP: ""
|
||||||
run: npm run tauri -- build --bundles ${{ matrix.bundles }}
|
run: npm run tauri -- build --bundles nsis
|
||||||
# ----------------------
|
# ----------------------
|
||||||
# Upload to MinIO (via mc) and create latest.json
|
# Upload to MinIO (via mc) and create latest.json
|
||||||
# ----------------------
|
# ----------------------
|
||||||
- name: Upload artifacts to MinIO with cicd_tool
|
- name: Upload artifacts to MinIO with cicd_tool
|
||||||
working-directory: GitLite/cicd_tool
|
working-directory: GitLite/cicd_tool
|
||||||
env:
|
env:
|
||||||
PUBLISH_PLATFORM: ${{ matrix.updater_platform }}
|
PUBLISH_PLATFORM: windows-x86_64
|
||||||
run: |
|
run: |
|
||||||
uv sync
|
uv sync
|
||||||
uv run main.py
|
uv run main.py
|
||||||
|
|
||||||
publish-arch:
|
publish-arch:
|
||||||
name: Build and publish gitty-desktop to AUR
|
name: Build and publish gitty-desktop to AUR
|
||||||
|
needs: publish-windows
|
||||||
runs-on: archlinux
|
runs-on: archlinux
|
||||||
environment: production
|
environment: production
|
||||||
env:
|
env:
|
||||||
@@ -247,3 +216,78 @@ jobs:
|
|||||||
|
|
||||||
git commit -m "Update to $PACKAGE_VERSION"
|
git commit -m "Update to $PACKAGE_VERSION"
|
||||||
git push origin HEAD:master
|
git push origin HEAD:master
|
||||||
|
|
||||||
|
publish-ubuntu:
|
||||||
|
name: Build and publish Ubuntu AppImage
|
||||||
|
needs: publish-arch
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
environment: production
|
||||||
|
env:
|
||||||
|
GITEA_API: https://git.cbsk-tech.de/api/v1
|
||||||
|
OWNER: Christoph
|
||||||
|
REPO: GitLite
|
||||||
|
GITEA_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
|
||||||
|
GITEA_FALLBACK_TOKEN: ${{ github.token }}
|
||||||
|
|
||||||
|
MINIO_ENDPOINT: ${{ vars.MINIO_ENDPOINT }}
|
||||||
|
S3_BUCKET: ${{ vars.S3_BUCKET }}
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_KEY }}
|
||||||
|
ARTIFACT_BASE_URL: ${{ vars.ARTIFACT_BASE_URL }}
|
||||||
|
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
|
||||||
|
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: GitLite
|
||||||
|
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v5
|
||||||
|
with:
|
||||||
|
path: GitLite
|
||||||
|
|
||||||
|
- name: Install Ubuntu dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y build-essential curl wget file libssl-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf libxdo-dev libfuse2
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: lts/*
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
|
||||||
|
|
||||||
|
- name: Install Rust toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
|
- name: Install frontend dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Update package.json version
|
||||||
|
run: npm version ${{ github.ref_name }} --no-git-tag-version --allow-same-version
|
||||||
|
|
||||||
|
- name: Update tauri.conf.json version
|
||||||
|
env:
|
||||||
|
RELEASE_VERSION: ${{ github.ref_name }}
|
||||||
|
run: |
|
||||||
|
node -e "const fs=require('fs'); const path='src-tauri/tauri.conf.json'; const config=JSON.parse(fs.readFileSync(path,'utf8')); config.version=process.env.RELEASE_VERSION; fs.writeFileSync(path, JSON.stringify(config,null,2)+'\n');"
|
||||||
|
|
||||||
|
- name: Build Tauri App
|
||||||
|
env:
|
||||||
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||||
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD}}
|
||||||
|
NO_STRIP: "1"
|
||||||
|
run: npm run tauri -- build --bundles appimage
|
||||||
|
|
||||||
|
- name: Upload artifacts to MinIO with cicd_tool
|
||||||
|
working-directory: GitLite/cicd_tool
|
||||||
|
env:
|
||||||
|
PUBLISH_PLATFORM: linux-x86_64
|
||||||
|
run: |
|
||||||
|
uv sync
|
||||||
|
uv run main.py
|
||||||
|
|||||||
Reference in New Issue
Block a user