Merge pull request 'fix/skip-master-test-workflow' (#3) from fix/skip-master-test-workflow into master
Some checks failed
Auto Tag / auto-tag (push) Successful in 4s
Release / build-macos-arm64 (push) Successful in 4m46s
Release / build-windows-amd64 (push) Has been cancelled
Release / build-linux-arm64 (push) Successful in 31m33s
Release / build-linux-amd64 (push) Successful in 31m48s
Some checks failed
Auto Tag / auto-tag (push) Successful in 4s
Release / build-macos-arm64 (push) Successful in 4m46s
Release / build-windows-amd64 (push) Has been cancelled
Release / build-linux-arm64 (push) Successful in 31m33s
Release / build-linux-amd64 (push) Successful in 31m48s
Reviewed-on: #3
This commit is contained in:
commit
55aaa5cf4a
@ -130,13 +130,18 @@ jobs:
|
|||||||
cargo install tauri-cli --version "^2" --locked
|
cargo install tauri-cli --version "^2" --locked
|
||||||
# Build the .app bundle only (no DMG yet so we can sign before packaging)
|
# Build the .app bundle only (no DMG yet so we can sign before packaging)
|
||||||
CI=true cargo tauri build --target aarch64-apple-darwin --bundles app
|
CI=true cargo tauri build --target aarch64-apple-darwin --bundles app
|
||||||
APP=src-tauri/target/aarch64-apple-darwin/release/bundle/macos/TFTSR.app
|
APP=$(find src-tauri/target/aarch64-apple-darwin/release/bundle/macos -maxdepth 1 -type d -name "*.app" | head -n 1)
|
||||||
|
if [ -z "$APP" ]; then
|
||||||
|
echo "ERROR: Could not find macOS app bundle"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
APP_NAME=$(basename "$APP" .app)
|
||||||
# Ad-hoc sign: changes Gatekeeper error from "damaged" to "unidentified developer"
|
# Ad-hoc sign: changes Gatekeeper error from "damaged" to "unidentified developer"
|
||||||
codesign --deep --force --sign - "$APP"
|
codesign --deep --force --sign - "$APP"
|
||||||
# Create DMG from the signed .app
|
# Create DMG from the signed .app
|
||||||
mkdir -p src-tauri/target/aarch64-apple-darwin/release/bundle/dmg
|
mkdir -p src-tauri/target/aarch64-apple-darwin/release/bundle/dmg
|
||||||
DMG=src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/TFTSR.dmg
|
DMG=src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/${APP_NAME}.dmg
|
||||||
hdiutil create -volname "TFTSR" -srcfolder "$APP" -ov -format UDZO "$DMG"
|
hdiutil create -volname "$APP_NAME" -srcfolder "$APP" -ov -format UDZO "$DMG"
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
env:
|
env:
|
||||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
|||||||
@ -2,8 +2,8 @@ name: Test
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches-ignore:
|
||||||
- '**'
|
- master
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -14,10 +14,22 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: |
|
||||||
|
set -eux
|
||||||
apt-get update -qq && apt-get install -y -qq git
|
apt-get update -qq && apt-get install -y -qq git
|
||||||
git init
|
git init
|
||||||
git remote add origin http://172.0.0.29:3000/sarman/tftsr-devops_investigation.git
|
git remote add origin http://172.0.0.29:3000/sarman/tftsr-devops_investigation.git
|
||||||
git fetch --depth=1 origin $GITHUB_SHA
|
if [ -n "${GITHUB_SHA:-}" ] && git fetch --depth=1 origin "$GITHUB_SHA"; then
|
||||||
|
echo "Fetched commit SHA: $GITHUB_SHA"
|
||||||
|
elif [ -n "${GITHUB_REF_NAME:-}" ] && git fetch --depth=1 origin "$GITHUB_REF_NAME"; then
|
||||||
|
echo "Fetched ref name: $GITHUB_REF_NAME"
|
||||||
|
elif [ -n "${GITHUB_REF:-}" ]; then
|
||||||
|
REF_NAME="${GITHUB_REF#refs/heads/}"
|
||||||
|
git fetch --depth=1 origin "$REF_NAME"
|
||||||
|
echo "Fetched ref from GITHUB_REF: $REF_NAME"
|
||||||
|
else
|
||||||
|
git fetch --depth=1 origin master
|
||||||
|
echo "Fetched fallback ref: master"
|
||||||
|
fi
|
||||||
git checkout FETCH_HEAD
|
git checkout FETCH_HEAD
|
||||||
- run: rustup component add rustfmt
|
- run: rustup component add rustfmt
|
||||||
- run: cargo fmt --manifest-path src-tauri/Cargo.toml --check
|
- run: cargo fmt --manifest-path src-tauri/Cargo.toml --check
|
||||||
@ -29,10 +41,22 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: |
|
||||||
|
set -eux
|
||||||
apt-get update -qq && apt-get install -y -qq git
|
apt-get update -qq && apt-get install -y -qq git
|
||||||
git init
|
git init
|
||||||
git remote add origin http://172.0.0.29:3000/sarman/tftsr-devops_investigation.git
|
git remote add origin http://172.0.0.29:3000/sarman/tftsr-devops_investigation.git
|
||||||
git fetch --depth=1 origin $GITHUB_SHA
|
if [ -n "${GITHUB_SHA:-}" ] && git fetch --depth=1 origin "$GITHUB_SHA"; then
|
||||||
|
echo "Fetched commit SHA: $GITHUB_SHA"
|
||||||
|
elif [ -n "${GITHUB_REF_NAME:-}" ] && git fetch --depth=1 origin "$GITHUB_REF_NAME"; then
|
||||||
|
echo "Fetched ref name: $GITHUB_REF_NAME"
|
||||||
|
elif [ -n "${GITHUB_REF:-}" ]; then
|
||||||
|
REF_NAME="${GITHUB_REF#refs/heads/}"
|
||||||
|
git fetch --depth=1 origin "$REF_NAME"
|
||||||
|
echo "Fetched ref from GITHUB_REF: $REF_NAME"
|
||||||
|
else
|
||||||
|
git fetch --depth=1 origin master
|
||||||
|
echo "Fetched fallback ref: master"
|
||||||
|
fi
|
||||||
git checkout FETCH_HEAD
|
git checkout FETCH_HEAD
|
||||||
- run: apt-get update -qq && apt-get install -y -qq libwebkit2gtk-4.1-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf pkg-config perl
|
- run: apt-get update -qq && apt-get install -y -qq libwebkit2gtk-4.1-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf pkg-config perl
|
||||||
- run: rustup component add clippy
|
- run: rustup component add clippy
|
||||||
@ -45,10 +69,22 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: |
|
||||||
|
set -eux
|
||||||
apt-get update -qq && apt-get install -y -qq git
|
apt-get update -qq && apt-get install -y -qq git
|
||||||
git init
|
git init
|
||||||
git remote add origin http://172.0.0.29:3000/sarman/tftsr-devops_investigation.git
|
git remote add origin http://172.0.0.29:3000/sarman/tftsr-devops_investigation.git
|
||||||
git fetch --depth=1 origin $GITHUB_SHA
|
if [ -n "${GITHUB_SHA:-}" ] && git fetch --depth=1 origin "$GITHUB_SHA"; then
|
||||||
|
echo "Fetched commit SHA: $GITHUB_SHA"
|
||||||
|
elif [ -n "${GITHUB_REF_NAME:-}" ] && git fetch --depth=1 origin "$GITHUB_REF_NAME"; then
|
||||||
|
echo "Fetched ref name: $GITHUB_REF_NAME"
|
||||||
|
elif [ -n "${GITHUB_REF:-}" ]; then
|
||||||
|
REF_NAME="${GITHUB_REF#refs/heads/}"
|
||||||
|
git fetch --depth=1 origin "$REF_NAME"
|
||||||
|
echo "Fetched ref from GITHUB_REF: $REF_NAME"
|
||||||
|
else
|
||||||
|
git fetch --depth=1 origin master
|
||||||
|
echo "Fetched fallback ref: master"
|
||||||
|
fi
|
||||||
git checkout FETCH_HEAD
|
git checkout FETCH_HEAD
|
||||||
- run: apt-get update -qq && apt-get install -y -qq libwebkit2gtk-4.1-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf pkg-config perl
|
- run: apt-get update -qq && apt-get install -y -qq libwebkit2gtk-4.1-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf pkg-config perl
|
||||||
- run: cargo test --manifest-path src-tauri/Cargo.toml
|
- run: cargo test --manifest-path src-tauri/Cargo.toml
|
||||||
@ -60,10 +96,22 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: |
|
||||||
|
set -eux
|
||||||
apk add --no-cache git
|
apk add --no-cache git
|
||||||
git init
|
git init
|
||||||
git remote add origin http://172.0.0.29:3000/sarman/tftsr-devops_investigation.git
|
git remote add origin http://172.0.0.29:3000/sarman/tftsr-devops_investigation.git
|
||||||
git fetch --depth=1 origin $GITHUB_SHA
|
if [ -n "${GITHUB_SHA:-}" ] && git fetch --depth=1 origin "$GITHUB_SHA"; then
|
||||||
|
echo "Fetched commit SHA: $GITHUB_SHA"
|
||||||
|
elif [ -n "${GITHUB_REF_NAME:-}" ] && git fetch --depth=1 origin "$GITHUB_REF_NAME"; then
|
||||||
|
echo "Fetched ref name: $GITHUB_REF_NAME"
|
||||||
|
elif [ -n "${GITHUB_REF:-}" ]; then
|
||||||
|
REF_NAME="${GITHUB_REF#refs/heads/}"
|
||||||
|
git fetch --depth=1 origin "$REF_NAME"
|
||||||
|
echo "Fetched ref from GITHUB_REF: $REF_NAME"
|
||||||
|
else
|
||||||
|
git fetch --depth=1 origin master
|
||||||
|
echo "Fetched fallback ref: master"
|
||||||
|
fi
|
||||||
git checkout FETCH_HEAD
|
git checkout FETCH_HEAD
|
||||||
- run: npm ci --legacy-peer-deps
|
- run: npm ci --legacy-peer-deps
|
||||||
- run: npx tsc --noEmit
|
- run: npx tsc --noEmit
|
||||||
@ -75,10 +123,22 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: |
|
||||||
|
set -eux
|
||||||
apk add --no-cache git
|
apk add --no-cache git
|
||||||
git init
|
git init
|
||||||
git remote add origin http://172.0.0.29:3000/sarman/tftsr-devops_investigation.git
|
git remote add origin http://172.0.0.29:3000/sarman/tftsr-devops_investigation.git
|
||||||
git fetch --depth=1 origin $GITHUB_SHA
|
if [ -n "${GITHUB_SHA:-}" ] && git fetch --depth=1 origin "$GITHUB_SHA"; then
|
||||||
|
echo "Fetched commit SHA: $GITHUB_SHA"
|
||||||
|
elif [ -n "${GITHUB_REF_NAME:-}" ] && git fetch --depth=1 origin "$GITHUB_REF_NAME"; then
|
||||||
|
echo "Fetched ref name: $GITHUB_REF_NAME"
|
||||||
|
elif [ -n "${GITHUB_REF:-}" ]; then
|
||||||
|
REF_NAME="${GITHUB_REF#refs/heads/}"
|
||||||
|
git fetch --depth=1 origin "$REF_NAME"
|
||||||
|
echo "Fetched ref from GITHUB_REF: $REF_NAME"
|
||||||
|
else
|
||||||
|
git fetch --depth=1 origin master
|
||||||
|
echo "Fetched fallback ref: master"
|
||||||
|
fi
|
||||||
git checkout FETCH_HEAD
|
git checkout FETCH_HEAD
|
||||||
- run: npm ci --legacy-peer-deps
|
- run: npm ci --legacy-peer-deps
|
||||||
- run: npm run test:run
|
- run: npm run test:run
|
||||||
|
|||||||
@ -29,7 +29,7 @@ macOS runner runs jobs **directly on the host** (no Docker container) — macOS
|
|||||||
|
|
||||||
## Test Pipeline (`.woodpecker/test.yml`)
|
## Test Pipeline (`.woodpecker/test.yml`)
|
||||||
|
|
||||||
**Triggers:** Every push and pull request to any branch.
|
**Triggers:** Every push to non-`master` branches and all pull requests.
|
||||||
|
|
||||||
```
|
```
|
||||||
Pipeline steps:
|
Pipeline steps:
|
||||||
|
|||||||
23
tests/unit/releaseWorkflowMacBundle.test.ts
Normal file
23
tests/unit/releaseWorkflowMacBundle.test.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import { describe, expect, it } from "vitest";
|
||||||
|
import { readFileSync } from "node:fs";
|
||||||
|
import path from "node:path";
|
||||||
|
|
||||||
|
const releaseWorkflowPath = path.resolve(
|
||||||
|
process.cwd(),
|
||||||
|
".gitea/workflows/release.yml",
|
||||||
|
);
|
||||||
|
|
||||||
|
describe("release workflow macOS bundle path", () => {
|
||||||
|
it("does not reference the legacy TFTSR.app bundle name", () => {
|
||||||
|
const workflow = readFileSync(releaseWorkflowPath, "utf-8");
|
||||||
|
|
||||||
|
expect(workflow).not.toContain("/bundle/macos/TFTSR.app");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("resolves the macOS .app bundle dynamically", () => {
|
||||||
|
const workflow = readFileSync(releaseWorkflowPath, "utf-8");
|
||||||
|
|
||||||
|
expect(workflow).toContain("APP=$(find");
|
||||||
|
expect(workflow).toContain("-name \"*.app\"");
|
||||||
|
});
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue
Block a user