Skip to content

Commit f0c32b2

Browse files
committed
Remove nightly support and update workflows to reflect changes
1 parent c38234b commit f0c32b2

7 files changed

Lines changed: 60 additions & 130 deletions

File tree

.github/actions/dotnet-setup/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ runs:
2222
using: composite
2323
steps:
2424
- name: Checkout repository
25-
uses: actions/checkout@v6
25+
uses: actions/checkout@v4
2626
with:
2727
fetch-depth: ${{ inputs.fetch-depth }}
2828
token: ${{ inputs.token }}
@@ -46,12 +46,12 @@ runs:
4646
echo "::notice::Resolved .NET version: ${TFM}.x"
4747
4848
- name: Setup .NET SDK
49-
uses: actions/setup-dotnet@v5
49+
uses: actions/setup-dotnet@v4
5050
with:
5151
dotnet-version: ${{ steps.detect-tfm.outputs.version }}
5252

5353
- name: Restore NuGet cache
54-
uses: actions/cache@v5
54+
uses: actions/cache@v4
5555
with:
5656
path: ~/.nuget/packages
5757
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/Directory.Packages.props', '**/Directory.Build.props') }}

.github/workflows/auto-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
steps:
2626
- name: Checkout repository
27-
uses: actions/checkout@v6
27+
uses: actions/checkout@v4
2828
with:
2929
fetch-depth: 0
3030
token: ${{ secrets.PAT_TOKEN }}

.github/workflows/build-and-package.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
steps:
3535
- name: Checkout Repository
36-
uses: actions/checkout@v6
36+
uses: actions/checkout@v4
3737

3838
- name: Setup .NET environment
3939
uses: ./.github/actions/dotnet-setup
@@ -88,30 +88,30 @@ jobs:
8888

8989
- name: Upload AppImage
9090
if: matrix.target == 'linux-x64'
91-
uses: actions/upload-artifact@v7
91+
uses: actions/upload-artifact@v4
9292
with:
9393
name: ${{ steps.appimage.outputs.appimage-name }}
9494
path: ${{ steps.appimage.outputs.appimage-name }}
9595
if-no-files-found: error
9696

9797
- name: Upload .desktop file
9898
if: matrix.target == 'linux-x64'
99-
uses: actions/upload-artifact@v7
99+
uses: actions/upload-artifact@v4
100100
with:
101101
name: io.github.frequency403.openssh_gui.desktop
102102
path: AppDir/usr/share/applications/io.github.frequency403.openssh_gui.desktop
103103
if-no-files-found: error
104104

105105
- name: Upload app icon
106106
if: matrix.target == 'linux-x64'
107-
uses: actions/upload-artifact@v7
107+
uses: actions/upload-artifact@v4
108108
with:
109109
name: appicon
110110
path: AppDir/appicon.png
111111
if-no-files-found: error
112112

113113
- name: Upload platform binary
114-
uses: actions/upload-artifact@v7
114+
uses: actions/upload-artifact@v4
115115
with:
116116
name: ${{ steps.rename.outputs.ASSET_NAME }}
117117
path: ./publish/${{ steps.rename.outputs.ASSET_NAME }}

.github/workflows/build.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,28 @@ concurrency:
1313
cancel-in-progress: false # Never cancel an in-flight release
1414

1515
jobs:
16+
test:
17+
name: Run Tests
18+
uses: ./.github/workflows/test.yml
19+
1620
prepare:
1721
name: Prepare Metadata
1822
runs-on: ubuntu-latest
1923
timeout-minutes: 5
24+
needs: test
2025
outputs:
2126
version: ${{ steps.version.outputs.version }}
2227
tag: ${{ steps.version.outputs.tag }}
2328
steps:
2429
- name: Checkout repository
25-
uses: actions/checkout@v6
30+
uses: actions/checkout@v4
2631

2732
- name: Determine Version
2833
id: version
2934
uses: ./.github/actions/determine-version
3035

3136
build:
32-
needs: prepare
37+
needs: [ test, prepare ]
3338
uses: ./.github/workflows/build-and-package.yml
3439
with:
3540
version: ${{ needs.prepare.outputs.version }}
@@ -40,14 +45,14 @@ jobs:
4045
name: Create GitHub Release
4146
runs-on: ubuntu-latest
4247
timeout-minutes: 15
43-
needs: [ prepare, build ]
48+
needs: [ test, prepare, build ]
4449

4550
steps:
4651
- name: Checkout repository
47-
uses: actions/checkout@v6
52+
uses: actions/checkout@v4
4853

4954
- name: Download all build artifacts
50-
uses: actions/download-artifact@v8
55+
uses: actions/download-artifact@v4
5156
with:
5257
path: artifacts/
5358

@@ -89,7 +94,7 @@ jobs:
8994
ls -lah release-assets/
9095
9196
- name: Publish GitHub Release
92-
uses: softprops/action-gh-release@v3
97+
uses: softprops/action-gh-release@v2
9398
with:
9499
tag_name: ${{ needs.prepare.outputs.tag }}
95100
files: release-assets/*
@@ -99,16 +104,16 @@ jobs:
99104
name: Update AUR Packages
100105
runs-on: ubuntu-latest
101106
timeout-minutes: 15
102-
needs: [ prepare, release ]
107+
needs: [ test, prepare, release ]
103108

104109
steps:
105110
- name: Checkout repository
106-
uses: actions/checkout@v6
111+
uses: actions/checkout@v4
107112
with:
108113
fetch-depth: 1
109114

110115
- name: Download build artifacts
111-
uses: actions/download-artifact@v8
116+
uses: actions/download-artifact@v4
112117
with:
113118
path: artifacts/
114119

@@ -178,11 +183,11 @@ jobs:
178183
name: Update Winget Package
179184
runs-on: ubuntu-slim
180185
timeout-minutes: 10
181-
needs: [ prepare, release ]
186+
needs: [ test, prepare, release ]
182187

183188
steps:
184189
- name: Checkout Repository
185-
uses: actions/checkout@v6
190+
uses: actions/checkout@v4
186191

187192
- name: Update Winget manifest
188193
uses: vedantmgoyal9/winget-releaser@main

.github/workflows/staging.yml

Lines changed: 24 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Staging / Nightly Build
1+
name: Staging / Development Build
22

33
on:
44
push:
@@ -9,115 +9,59 @@ permissions:
99
contents: write
1010

1111
concurrency:
12-
group: nightly-${{ github.ref }}
13-
cancel-in-progress: true # Supersede previous nightly on rapid pushes
12+
group: staging-${{ github.ref }}
13+
cancel-in-progress: true # Supersede previous run on rapid pushes
1414

1515
jobs:
16+
test:
17+
name: Run Tests
18+
uses: ./.github/workflows/test.yml
19+
1620
prepare:
1721
name: Prepare Metadata
1822
runs-on: ubuntu-latest
1923
timeout-minutes: 5
24+
needs: test
2025
outputs:
21-
version: ${{ steps.meta.outputs.version }}
22-
base_version: ${{ steps.meta.outputs.base_version }}
23-
git_hash: ${{ steps.meta.outputs.git_hash }}
24-
build_date: ${{ steps.meta.outputs.build_date }}
26+
version: ${{ steps.version.outputs.version }}
27+
tag: ${{ steps.version.outputs.tag }}
2528

2629
steps:
2730
- name: Checkout repository
28-
uses: actions/checkout@v6
31+
uses: actions/checkout@v4
2932

3033
- name: Determine Version
3134
id: version
3235
uses: ./.github/actions/determine-version
3336

34-
- name: Resolve build metadata
35-
id: meta
36-
run: |
37-
set -euo pipefail
38-
HASH=$(git rev-parse --short HEAD)
39-
DATE=$(date +%Y-%m-%d)
40-
BASE_VERSION="${{ steps.version.outputs.version }}"
41-
42-
VERSION="${BASE_VERSION}+${HASH}"
43-
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
44-
echo "base_version=$BASE_VERSION" >> "$GITHUB_OUTPUT"
45-
echo "git_hash=$HASH" >> "$GITHUB_OUTPUT"
46-
echo "build_date=$DATE" >> "$GITHUB_OUTPUT"
47-
echo "::notice::Nightly version: $VERSION"
48-
49-
build:
50-
needs: prepare
51-
uses: ./.github/workflows/build-and-package.yml
52-
with:
53-
version: ${{ needs.prepare.outputs.version }}
54-
is_nightly: true
55-
asset_name_prefix: OpenSSH-GUI-nightly
56-
57-
deploy-aur-nightly:
58-
name: Update AUR Nightly Package
37+
deploy-aur-git:
38+
name: Update AUR Git Package
5939
runs-on: ubuntu-latest
6040
timeout-minutes: 15
61-
needs: [ prepare, build ]
41+
needs: [ test, prepare ]
6242

6343
steps:
6444
- name: Checkout repository
65-
uses: actions/checkout@v6
45+
uses: actions/checkout@v4
6646
with:
6747
fetch-depth: 1
6848

69-
- name: Download build artifacts
70-
uses: actions/download-artifact@v8
71-
with:
72-
path: artifacts/
73-
74-
- name: Prepare and update nightly PKGBUILD
49+
- name: Update openssh-gui-git PKGBUILD
7550
run: |
7651
set -euo pipefail
77-
rm -rf aur-assets
78-
mkdir -p aur-assets
79-
80-
find artifacts -type f | while read -r FILE; do
81-
DEST="aur-assets/$(basename "$FILE")"
82-
if [[ -f "$DEST" ]]; then
83-
echo "::error::AUR artifact name collision: $(basename "$FILE")"
84-
exit 1
85-
fi
86-
cp "$FILE" "$DEST"
87-
done
88-
89-
test -f aur-assets/OpenSSH-GUI-nightly-linux-x64 \
90-
|| { echo "::error::Missing nightly linux binary"; exit 1; }
91-
test -f aur-assets/appicon.png \
92-
|| { echo "::error::Missing appicon.png"; exit 1; }
93-
test -f "aur-assets/io.github.frequency403.openssh_gui.desktop" \
94-
|| { echo "::error::Missing .desktop file"; exit 1; }
95-
test -f LICENSE \
96-
|| { echo "::error::Missing LICENSE"; exit 1; }
97-
98-
DATE=$(date +%Y%m%d)
99-
AUR_VERSION="${{ needs.prepare.outputs.base_version }}.${DATE}.${{ needs.prepare.outputs.git_hash }}"
100-
echo "AUR_VERSION=$AUR_VERSION" >> "$GITHUB_ENV"
101-
102-
SHA_BIN=$(sha256sum aur-assets/OpenSSH-GUI-nightly-linux-x64 | cut -d' ' -f1)
103-
SHA_ICON=$(sha256sum aur-assets/appicon.png | cut -d' ' -f1)
104-
SHA_DESKTOP=$(sha256sum "aur-assets/io.github.frequency403.openssh_gui.desktop" | cut -d' ' -f1)
105-
SHA_LICENSE=$(sha256sum LICENSE | cut -d' ' -f1)
106-
107-
sed -i "s/^pkgver=.*/pkgver=$AUR_VERSION/" openssh-gui-nightly/PKGBUILD
108-
sed -i "s/^pkgrel=.*/pkgrel=1/" openssh-gui-nightly/PKGBUILD
109-
sed -i "s/^sha256sums=.*/sha256sums=('$SHA_BIN' '$SHA_ICON' '$SHA_DESKTOP' '$SHA_LICENSE')/" \
110-
openssh-gui-nightly/PKGBUILD
52+
VERSION="${{ needs.prepare.outputs.version }}"
53+
sed -i "s/^pkgver=.*/pkgver=$VERSION/" openssh-gui-git/PKGBUILD
54+
sed -i "s/^pkgrel=.*/pkgrel=1/" openssh-gui-git/PKGBUILD
11155
11256
echo "Updated PKGBUILD:"
113-
grep -E '^(pkgver=|pkgrel=|sha256sums=)' openssh-gui-nightly/PKGBUILD
57+
grep -E '^(pkgver=|pkgrel=)' openssh-gui-git/PKGBUILD
11458
115-
- name: Publish AUR (openssh-gui-nightly)
59+
- name: Publish AUR (openssh-gui-git)
11660
uses: KSXGitHub/github-actions-deploy-aur@v4.1.1
11761
with:
118-
pkgname: openssh-gui-nightly
119-
pkgbuild: ./openssh-gui-nightly/PKGBUILD
62+
pkgname: openssh-gui-git
63+
pkgbuild: ./openssh-gui-git/PKGBUILD
12064
commit_username: ${{ github.repository_owner }}
12165
commit_email: ${{ github.repository_owner }}@users.noreply.github.com
12266
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
123-
commit_message: "Nightly update ${{ env.AUR_VERSION }}"
67+
commit_message: "Development update ${{ needs.prepare.outputs.tag }}"

.github/workflows/test.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Unit Tests
22

33
on:
44
push:
5-
branches: [ main, master, development ]
65
pull_request:
76
branches: [ main, master, development ]
7+
workflow_call:
88

99
concurrency:
1010
group: tests-${{ github.ref }}-${{ github.event_name }}
@@ -15,11 +15,18 @@ jobs:
1515
name: Run Tests
1616
runs-on: ubuntu-latest
1717
timeout-minutes: 20
18+
# Run on every push except normal (non-forced) pushes to master/main.
19+
# Always run when called from another workflow (workflow_call).
20+
if: >
21+
github.event_name == 'workflow_call' ||
22+
github.event_name == 'pull_request' ||
23+
github.event.forced == true ||
24+
(github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main')
1825
1926
steps:
2027
- name: Checkout repository
21-
uses: actions/checkout@v6
22-
28+
uses: actions/checkout@v4
29+
2330
- name: Setup .NET environment
2431
uses: ./.github/actions/dotnet-setup
2532

@@ -30,4 +37,4 @@ jobs:
3037
run: dotnet build OpenSSH_GUI.slnx --configuration Release --no-restore
3138

3239
- name: Run tests
33-
run: dotnet test OpenSSH_GUI.slnx --configuration Release --no-build --verbosity normal
40+
run: dotnet test OpenSSH_GUI.slnx --configuration Release --no-build --verbosity normal

openssh-gui-nightly/PKGBUILD

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)