aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/dependabot.yml10
-rw-r--r--.github/workflows/ci.yml32
-rw-r--r--.github/workflows/package-win.yml285
-rw-r--r--.github/workflows/package.yml170
-rw-r--r--.github/workflows/release.yml265
5 files changed, 0 insertions, 762 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index 98e44ee..0000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-version: 2
-updates:
- - package-ecosystem: "cargo"
- directory: "/"
- schedule:
- interval: "weekly"
- - package-ecosystem: "github-actions"
- directory: "/"
- schedule:
- interval: "weekly"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
deleted file mode 100644
index 63e65ae..0000000
--- a/.github/workflows/ci.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-name: CI
-
-on:
- push:
- branches: [ main, master ]
- pull_request:
- branches: [ main, master ]
-
-env:
- CARGO_TERM_COLOR: always
-
-jobs:
- test:
- name: Test
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - name: Install Rust
- uses: dtolnay/rust-toolchain@stable
-
- - name: Check formatting
- run: cargo fmt -- --check
-
- - name: Run clippy
- run: cargo clippy --all-targets -- -D warnings
-
- - name: Run tests
- run: cargo test --all-targets --verbose
-
- - name: Build
- run: cargo build --verbose
diff --git a/.github/workflows/package-win.yml b/.github/workflows/package-win.yml
deleted file mode 100644
index 53ea743..0000000
--- a/.github/workflows/package-win.yml
+++ /dev/null
@@ -1,285 +0,0 @@
-name: Windows Installer Packaging (Inno Setup)
-
-on:
- release:
- types: [released]
- workflow_dispatch:
- inputs:
- tag_name:
- description: 'Release Tag (e.g., v1.0.0). Leave empty to use "latest".'
- required: false
- default: ''
-
-jobs:
- package-windows:
- runs-on: windows-latest
- permissions:
- contents: write
- steps:
- - name: Checkout Repository
- uses: actions/checkout@v4
-
- - name: Get Version from Cargo.toml
- id: get_version
- shell: pwsh
- run: |
- $VersionLine = Get-Content Cargo.toml | Select-String '^version\s*=\s*"(.*)"'
- if ($VersionLine.Matches.Success) {
- $Version = $VersionLine.Matches.Groups[1].Value
- Write-Host "Found version in Cargo.toml: $Version"
- "version=$Version" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
- } else {
- Write-Error "Could not find version in Cargo.toml"
- exit 1
- }
-
- - name: Determine Release Tag
- id: get_tag
- shell: pwsh
- env:
- GH_TOKEN: ${{ github.token }}
- run: |
- $TAG = "${{ inputs.tag_name }}"
- if (-not $TAG) { $TAG = "${{ github.event.release.tag_name }}" }
-
- if (-not $TAG) {
- Write-Host "No tag provided, fetching latest release..."
- $TAG = $(gh release view --json tagName --jq .tagName)
- }
-
- if (-not $TAG) {
- Write-Error "Could not determine release tag."
- exit 1
- }
-
- Write-Host "Using Tag: $TAG"
- "tag=$TAG" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
-
- - name: Download Release Assets
- env:
- GH_TOKEN: ${{ github.token }}
- run: |
- $TAG = "${{ steps.get_tag.outputs.tag }}"
- $Version = "${{ steps.get_version.outputs.version }}"
-
- # Download the raw binaries
- gh release download $TAG -p "mikusays-windows-x86_64-$Version.exe"
- gh release download $TAG -p "mikusays-windows-aarch64-$Version.exe"
-
- # Rename to standard names for the Inno Script
- mv "mikusays-windows-x86_64-$Version.exe" "mikusays-windows-x86_64.exe"
- mv "mikusays-windows-aarch64-$Version.exe" "mikusays-windows-aarch64.exe"
-
- - name: Generate Inno Setup Script
- shell: pwsh
- run: |
- $Version = "${{ steps.get_version.outputs.version }}"
- $InstallerName = "mikusays-windows-inst-any-$Version"
-
- Write-Host "Generating Inno Setup script for version: $Version"
-
- $issContent = @'
- [Setup]
- AppName=mikusays
- AppVersion=__VERSION__
- AppCopyright=2025 xxanqw
- AppPublisher=xxanqw
- AppPublisherURL=https://xxanqw.pp.ua/
- AppSupportURL=https://github.com/xxanqw/mikusays/issues
- AppUpdatesURL=https://github.com/xxanqw/mikusays/releases/latest
-
- AppId={{A0ED7972-D08B-48CB-8331-729D1001FF16}
-
- DefaultDirName={localappdata}\Programs\mikusays
- DefaultGroupName=Mikusays
- DisableProgramGroupPage=yes
- PrivilegesRequired=lowest
-
- ; -- Output Configuration --
- OutputBaseFilename=__OUTFILE__
- OutputDir=.
- Compression=lzma2/ultra64
- SolidCompression=yes
-
- ; -- Architecture Configuration --
- ArchitecturesInstallIn64BitMode=x64compatible arm64
- ArchitecturesAllowed=x64compatible arm64
-
- ChangesEnvironment=yes
-
- [Languages]
- Name: "english"; MessagesFile: "compiler:Default.isl"
-
- [Files]
- Source: "mikusays-windows-x86_64.exe"; DestDir: "{app}"; DestName: "mikusays.exe"; Check: IsX64; Flags: ignoreversion
- Source: "mikusays-windows-aarch64.exe"; DestDir: "{app}"; DestName: "mikusays.exe"; Check: IsARM64; Flags: ignoreversion
-
- [Icons]
- Name: "{group}\Mikusays"; Filename: "{app}\mikusays.exe"
- Name: "{group}\Uninstall Mikusays"; Filename: "{uninstallexe}"
-
- [Code]
- function IsX64: Boolean;
- begin
- Result := Is64BitInstallMode and (ProcessorArchitecture = paX64);
- end;
-
- function IsARM64: Boolean;
- begin
- Result := Is64BitInstallMode and (ProcessorArchitecture = paARM64);
- end;
-
- const
- VC_REDIST_X64_URL = 'https://aka.ms/vs/17/release/vc_redist.x64.exe';
- VC_REDIST_ARM64_URL = 'https://aka.ms/vs/17/release/vc_redist.arm64.exe';
-
- var
- DownloadPage: TDownloadWizardPage;
-
- procedure InitializeWizard;
- begin
- DownloadPage := CreateDownloadPage(SetupMessage(msgWizardPreparing), SetupMessage(msgPreparingDesc), nil);
- end;
-
- function NextButtonClick(CurPageID: Integer): Boolean;
- var
- RedistUrl, RedistFile: String;
- ResultCode: Integer;
- begin
- Result := True;
-
- if CurPageID = wpReady then
- begin
- DownloadPage.Clear;
-
- if IsARM64 then
- RedistUrl := VC_REDIST_ARM64_URL
- else
- RedistUrl := VC_REDIST_X64_URL;
-
- RedistFile := 'vc_redist.exe';
-
- DownloadPage.Add(RedistUrl, RedistFile, '');
- DownloadPage.Show;
-
- try
- try
- DownloadPage.Download;
- Exec(ExpandConstant('{tmp}\' + RedistFile), '/install /quiet /norestart', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
- except
- if MsgBox('Download of Visual C++ Redistributable failed: ' + GetExceptionMessage + #13#10#13#10 + 'Do you want to continue installation anyway?', mbError, MB_YESNO) = IDNO then
- Result := False;
- end;
- finally
- DownloadPage.Hide;
- end;
- end;
- end;
-
- function NeedsAddPath(Param: string): boolean;
- var
- OrigPath: string;
- begin
- if not RegQueryStringValue(HKEY_CURRENT_USER, 'Environment', 'Path', OrigPath) then
- begin
- Result := True;
- exit;
- end;
- Result := Pos(';' + Param + ';', ';' + OrigPath + ';') = 0;
- end;
-
- procedure RemovePath(Param: string);
- var
- OrigPath: string;
- P: Integer;
- begin
- if not RegQueryStringValue(HKEY_CURRENT_USER, 'Environment', 'Path', OrigPath) then
- exit;
-
- P := Pos(';' + Param + ';', OrigPath);
- if P > 0 then
- begin
- Delete(OrigPath, P + 1, Length(Param) + 1);
- RegWriteExpandStringValue(HKEY_CURRENT_USER, 'Environment', 'Path', OrigPath);
- exit;
- end;
-
- if Pos(Param + ';', OrigPath) = 1 then
- begin
- Delete(OrigPath, 1, Length(Param) + 1);
- RegWriteExpandStringValue(HKEY_CURRENT_USER, 'Environment', 'Path', OrigPath);
- exit;
- end;
-
- P := Pos(';' + Param, OrigPath);
- if (P > 0) and (P = Length(OrigPath) - Length(Param)) then
- begin
- Delete(OrigPath, P, Length(Param) + 1);
- RegWriteExpandStringValue(HKEY_CURRENT_USER, 'Environment', 'Path', OrigPath);
- end;
- end;
-
- procedure CurStepChanged(CurStep: TSetupStep);
- var
- OrigPath: string;
- begin
- if CurStep = ssPostInstall then
- begin
- if NeedsAddPath(ExpandConstant('{app}')) then
- begin
- if RegQueryStringValue(HKEY_CURRENT_USER, 'Environment', 'Path', OrigPath) then
- begin
- if OrigPath = '' then
- OrigPath := ExpandConstant('{app}')
- else
- OrigPath := OrigPath + ';' + ExpandConstant('{app}');
- end
- else
- OrigPath := ExpandConstant('{app}');
-
- RegWriteExpandStringValue(HKEY_CURRENT_USER, 'Environment', 'Path', OrigPath);
- end;
- end;
- end;
-
- procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
- begin
- if CurUninstallStep = usUninstall then
- begin
- RemovePath(ExpandConstant('{app}'));
- end;
- end;
- '@
-
- $issContent = $issContent.Replace("__VERSION__", $Version)
- $issContent = $issContent.Replace("__OUTFILE__", $InstallerName)
-
- Set-Content -Path "installer.iss" -Value $issContent
-
- - name: List workspace contents for debug
- shell: pwsh
- run: |
- Write-Host "-- Workspace Contents --"
- Get-ChildItem -File | ForEach-Object { Write-Host $_.Name }
-
- - name: Compile Installer
- shell: cmd
- run: '"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" installer.iss'
-
- - name: Upload Installer to Release
- env:
- GH_TOKEN: ${{ github.token }}
- run: |
- $TAG = "${{ steps.get_tag.outputs.tag }}"
- $Version = "${{ steps.get_version.outputs.version }}"
-
- # With OutputDir=. the file is in root
- $UploadFile = "mikusays-windows-inst-any-$Version.exe"
-
- if (-not (Test-Path $UploadFile)) {
- Write-Error "Could not find compiled installer at $UploadFile"
- Get-ChildItem
- exit 1
- }
-
- gh release upload $TAG $UploadFile --clobber
diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml
deleted file mode 100644
index 7c1867c..0000000
--- a/.github/workflows/package.yml
+++ /dev/null
@@ -1,170 +0,0 @@
-name: Build Packages
-permissions:
- contents: read
-
-on:
- release:
- types: [created]
- workflow_dispatch:
- inputs:
- release_tag:
- description: 'Release tag to attach packages to (e.g., v0.1.3)'
- required: false
- type: string
-
-jobs:
- build-deb:
- name: Build DEB Package (${{ matrix.arch }})
- permissions:
- contents: write
- runs-on: ubuntu-latest
- strategy:
- matrix:
- include:
- - arch: x86_64
- target: x86_64-unknown-linux-gnu
- - arch: aarch64
- target: aarch64-unknown-linux-gnu
- steps:
- - uses: actions/checkout@v4
-
- - name: Install Rust
- uses: dtolnay/rust-toolchain@stable
- with:
- targets: ${{ matrix.target }}
-
- - name: Install cross-compilation tools
- if: matrix.arch == 'aarch64'
- run: |
- sudo apt-get update
- sudo apt-get install -y gcc-aarch64-linux-gnu
-
- - name: Install cargo-deb
- run: cargo install cargo-deb
-
- - name: Build DEB package
- run: cargo deb --target ${{ matrix.target }}
- env:
- CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
-
- - name: Find DEB package
- id: find-deb
- run: |
- DEB_PATH=$(find target/${{ matrix.target }}/debian -name "*.deb" | head -n 1)
- echo "path=$DEB_PATH" >> $GITHUB_OUTPUT
- VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
- DEB_NAME="mikusays-debian-${{ matrix.arch }}-${VERSION}.deb"
- echo "version=$VERSION" >> $GITHUB_OUTPUT
- echo "name=$DEB_NAME" >> $GITHUB_OUTPUT
-
- - name: Upload DEB artifact
- uses: actions/upload-artifact@v4
- with:
- name: deb-package-${{ matrix.arch }}
- path: ${{ steps.find-deb.outputs.path }}
-
- - name: Upload to release
- if: github.event_name == 'release' || github.event.inputs.release_tag
- env:
- GH_TOKEN: ${{ github.token }}
- RELEASE_TAG: ${{ github.event.release.tag_name || github.event.inputs.release_tag }}
- run: |
- install -m 0644 "${{ steps.find-deb.outputs.path }}" \
- "$RUNNER_TEMP/${{ steps.find-deb.outputs.name }}"
- gh release upload "$RELEASE_TAG" \
- "$RUNNER_TEMP/${{ steps.find-deb.outputs.name }}" \
- --repo "$GITHUB_REPOSITORY" \
- --clobber
-
- build-rpm:
- name: Build RPM Package (${{ matrix.arch }})
- permissions:
- contents: write
- runs-on: ubuntu-latest
- strategy:
- matrix:
- include:
- - arch: x86_64
- target: x86_64-unknown-linux-gnu
- - arch: aarch64
- target: aarch64-unknown-linux-gnu
- steps:
- - uses: actions/checkout@v4
-
- - name: Install Rust
- uses: dtolnay/rust-toolchain@stable
- with:
- targets: ${{ matrix.target }}
-
- - name: Install cross-compilation tools
- if: matrix.arch == 'aarch64'
- run: |
- sudo apt-get update
- sudo apt-get install -y gcc-aarch64-linux-gnu
-
- - name: Install cargo-generate-rpm
- run: cargo install cargo-generate-rpm
-
- - name: Build release binary
- run: cargo build --release --target ${{ matrix.target }}
- env:
- CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
-
- - name: Strip binary
- run: |
- if [ "${{ matrix.arch }}" = "aarch64" ]; then
- aarch64-linux-gnu-strip target/${{ matrix.target }}/release/mikusays
- else
- strip target/${{ matrix.target }}/release/mikusays
- fi
-
- - name: Generate RPM package
- run: cargo generate-rpm --target ${{ matrix.target }}
-
- - name: Find RPM package
- id: find-rpm
- run: |
- RPM_PATH=$(find target/${{ matrix.target }}/generate-rpm -name "*.rpm" | head -n 1)
- echo "path=$RPM_PATH" >> $GITHUB_OUTPUT
- VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
- RPM_NAME="mikusays-redhat-${{ matrix.arch }}-${VERSION}.rpm"
- echo "version=$VERSION" >> $GITHUB_OUTPUT
- echo "name=$RPM_NAME" >> $GITHUB_OUTPUT
-
- - name: Upload RPM artifact
- uses: actions/upload-artifact@v4
- with:
- name: rpm-package-${{ matrix.arch }}
- path: ${{ steps.find-rpm.outputs.path }}
-
- - name: Upload to release
- if: github.event_name == 'release' || github.event.inputs.release_tag
- env:
- GH_TOKEN: ${{ github.token }}
- RELEASE_TAG: ${{ github.event.release.tag_name || github.event.inputs.release_tag }}
- run: |
- install -m 0644 "${{ steps.find-rpm.outputs.path }}" \
- "$RUNNER_TEMP/${{ steps.find-rpm.outputs.name }}"
- gh release upload "$RELEASE_TAG" \
- "$RUNNER_TEMP/${{ steps.find-rpm.outputs.name }}" \
- --repo "$GITHUB_REPOSITORY" \
- --clobber
-
- notify-package-repository:
- name: Notify package repository
- runs-on: ubuntu-latest
- needs: [build-deb, build-rpm]
- if: github.event_name == 'release' || github.event.inputs.release_tag
- permissions:
- contents: read
- steps:
- - name: Dispatch exact release tag
- env:
- GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- RELEASE_TAG: ${{ github.event.release.tag_name || github.event.inputs.release_tag }}
- run: |
- if ! gh api --method POST repos/xxanqw/apt-repository/dispatches \
- --raw-field event_type=new-release \
- --field "client_payload[tag_name]=$RELEASE_TAG"; then
- echo "::warning::Could not dispatch apt-repository; its daily schedule will publish the release. Check RELEASE_TOKEN if immediate updates are required."
- fi
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index 8ed17a4..0000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,265 +0,0 @@
-name: Cross-platform Build
-
-on:
- push:
- tags: [ 'v*' ]
- workflow_dispatch:
-
-permissions:
- contents: write
-
-jobs:
- extract-version:
- name: Extract Version
- runs-on: ubuntu-latest
- outputs:
- version: ${{ steps.get_version.outputs.version }}
- version_valid: ${{ steps.validate_version.outputs.valid }}
- steps:
- - uses: actions/checkout@v4
-
- - name: Get version from Cargo.toml
- id: get_version
- run: |
- VERSION=$(grep '^version =' Cargo.toml | sed -E 's/version = "([^"]+)"/\1/')
- echo "Extracted version: $VERSION"
- echo "version=$VERSION" >> $GITHUB_OUTPUT
-
- - name: Validate SemVer
- id: validate_version
- run: |
- VERSION=${{ steps.get_version.outputs.version }}
- # Comprehensive SemVer validation regex
- # Supports: MAJOR.MINOR.PATCH-PRERELEASE+BUILD
- # Where PRERELEASE can be: alpha, beta, rc.1, etc.
- # Where BUILD can be: build.123, sha.abc123, etc.
- if [[ ! $VERSION =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?(\+([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?$ ]]; then
- echo "Error: Version '$VERSION' is not a valid SemVer string"
- echo "valid=false" >> $GITHUB_OUTPUT
- exit 1
- else
- echo "Version '$VERSION' is valid SemVer"
- echo "valid=true" >> $GITHUB_OUTPUT
- fi
-
- build-windows:
- name: Build Windows
- runs-on: windows-latest
- needs: extract-version
- strategy:
- matrix:
- target:
- - x86_64-pc-windows-msvc
- - aarch64-pc-windows-msvc
- steps:
- - uses: actions/checkout@v4
-
- - name: Install Rust
- uses: dtolnay/rust-toolchain@stable
- with:
- targets: ${{ matrix.target }}
-
- - name: Build
- run: cargo build --release --target ${{ matrix.target }}
-
- - name: Prepare artifact
- run: |
- mkdir artifacts
- $arch = "${{ matrix.target }}".Split('-')[0]
- $version = "${{ needs.extract-version.outputs.version }}"
- copy "target\${{ matrix.target }}\release\mikusays.exe" "artifacts\mikusays-windows-$arch-$version.exe"
-
- - name: Upload artifact
- uses: actions/upload-artifact@v4
- with:
- name: mikusays-windows-${{ matrix.target }}
- path: artifacts\*
- build-linux:
- name: Build Linux
- runs-on: ubuntu-latest
- needs: extract-version
- strategy:
- matrix:
- include:
- - target: x86_64-unknown-linux-gnu
- arch: x64
- - target: aarch64-unknown-linux-gnu
- arch: arm64
- steps:
- - uses: actions/checkout@v4
-
- - name: Install Rust
- uses: dtolnay/rust-toolchain@stable
- with:
- targets: ${{ matrix.target }}
-
- - name: Install cross-compilation tools
- if: matrix.target == 'aarch64-unknown-linux-gnu'
- run: |
- sudo apt-get update
- sudo apt-get install -y gcc-aarch64-linux-gnu
- echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
-
- - name: Build
- run: cargo build --release --target ${{ matrix.target }}
-
- - name: Strip binary
- run: |
- if [[ "${{ matrix.target }}" == "aarch64-unknown-linux-gnu" ]]; then
- aarch64-linux-gnu-strip target/${{ matrix.target }}/release/mikusays
- else
- strip target/${{ matrix.target }}/release/mikusays
- fi
-
- - name: Prepare artifact
- run: |
- mkdir -p artifacts staging
- version="${{ needs.extract-version.outputs.version }}"
- stem="mikusays-linux-${{ matrix.arch }}-$version"
- cp target/${{ matrix.target }}/release/mikusays "staging/$stem"
- chmod 755 "staging/$stem"
- tar -C staging -czf "artifacts/$stem.tar.gz" "$stem"
-
- - name: Verify artifact
- run: |
- version="${{ needs.extract-version.outputs.version }}"
- stem="mikusays-linux-${{ matrix.arch }}-$version"
- extract_dir="$(mktemp -d)"
- tar -tzf "artifacts/$stem.tar.gz" | grep -Fx "$stem"
- tar -xzf "artifacts/$stem.tar.gz" -C "$extract_dir"
- test -x "$extract_dir/$stem"
-
- - name: Upload artifact
- uses: actions/upload-artifact@v4
- with:
- name: mikusays-linux-${{ matrix.arch }}
- path: artifacts/*
- build-macos:
- name: Build macOS
- runs-on: macos-latest
- needs: extract-version
- strategy:
- matrix:
- include:
- - target: x86_64-apple-darwin
- arch: x64
- - target: aarch64-apple-darwin
- arch: arm64
- steps:
- - uses: actions/checkout@v4
-
- - name: Install Rust
- uses: dtolnay/rust-toolchain@stable
- with:
- targets: ${{ matrix.target }}
-
- - name: Build
- run: cargo build --release --target ${{ matrix.target }}
-
- - name: Strip binary
- run: strip target/${{ matrix.target }}/release/mikusays
-
- - name: Prepare artifact
- run: |
- mkdir -p artifacts staging
- version="${{ needs.extract-version.outputs.version }}"
- stem="mikusays-macos-${{ matrix.arch }}-$version"
- cp target/${{ matrix.target }}/release/mikusays "staging/$stem"
- chmod 755 "staging/$stem"
- tar -C staging -czf "artifacts/$stem.tar.gz" "$stem"
-
- - name: Verify artifact
- run: |
- version="${{ needs.extract-version.outputs.version }}"
- stem="mikusays-macos-${{ matrix.arch }}-$version"
- extract_dir="$(mktemp -d)"
- tar -tzf "artifacts/$stem.tar.gz" | grep -Fx "$stem"
- tar -xzf "artifacts/$stem.tar.gz" -C "$extract_dir"
- test -x "$extract_dir/$stem"
-
- - name: Upload artifact
- uses: actions/upload-artifact@v4
- with:
- name: mikusays-macos-${{ matrix.arch }}
- path: artifacts/*
-
- create-release:
- name: Create Release
- runs-on: ubuntu-latest
- needs: [extract-version, build-windows, build-linux, build-macos]
- if: startsWith(github.ref, 'refs/tags/v') && needs.extract-version.outputs.version_valid == 'true'
- steps:
- - uses: actions/checkout@v4
-
- - name: Download all artifacts
- uses: actions/download-artifact@v4
- with:
- path: artifacts
- merge-multiple: true
-
- - name: Display structure of downloaded files
- run: ls -R artifacts
-
- - name: Create Release
- uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
- with:
- files: artifacts/mikusays-*
- draft: false
- prerelease: false
- generate_release_notes: true
- body: |
- ## Downloads
-
- ### Windows
- - **x64**: `mikusays-windows-x86_64-${{ needs.extract-version.outputs.version }}.exe`
- - **ARM64**: `mikusays-windows-aarch64-${{ needs.extract-version.outputs.version }}.exe`
-
- ### Windows Installer
- - **Any**: `mikusays-windows-inst-any-${{ needs.extract-version.outputs.version }}.exe`
-
- ### Linux (tar.gz)
- - **x64**: `mikusays-linux-x64-${{ needs.extract-version.outputs.version }}.tar.gz`
- - **ARM64**: `mikusays-linux-arm64-${{ needs.extract-version.outputs.version }}.tar.gz`
-
- ### Debian Package
- - **x64 Debian Package**: `mikusays-debian-x86_64-${{ needs.extract-version.outputs.version }}.deb`
- - **ARM64 Debian Package**: `mikusays-debian-aarch64-${{ needs.extract-version.outputs.version }}.deb`
-
- ### RedHat (RPM) Package
- - **x64 RPM Package**: `mikusays-redhat-x86_64-${{ needs.extract-version.outputs.version }}.rpm`
- - **ARM64 RPM Package**: `mikusays-redhat-aarch64-${{ needs.extract-version.outputs.version }}.rpm`
-
- ### Repository for Debian / Ubuntu / Fedora / RHEL / CentOS
- Information on how to add it available here https://apt.xxanqw.pp.ua
-
- ### macOS (tar.gz)
- - **Intel (x64)**: `mikusays-macos-x64-${{ needs.extract-version.outputs.version }}.tar.gz`
- - **Apple Silicon (ARM64)**: `mikusays-macos-arm64-${{ needs.extract-version.outputs.version }}.tar.gz`
-
- ## Usage
- ```bash
- # Download and extract the appropriate archive on Linux/macOS:
- archive="mikusays-linux-x64-${{ needs.extract-version.outputs.version }}.tar.gz"
- tar -xzf "$archive"
-
- # Run the program:
- "./${archive%.tar.gz}" "Hello, World!"
-
- # If Gatekeeper blocks an unsigned macOS binary:
- xattr -d com.apple.quarantine "./${archive%.tar.gz}"
- ```
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Notify package managers
- env:
- GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- RELEASE_TAG: v${{ needs.extract-version.outputs.version }}
- run: |
- for repository in xxanqw/scoop-bucket xxanqw/homebrew-mikusays; do
- if ! gh api --method POST "repos/$repository/dispatches" \
- --raw-field event_type=new-release \
- --field "client_payload[tag_name]=$RELEASE_TAG"; then
- echo "::warning::Could not dispatch $repository; its four-hour schedule will pick up the release. Check RELEASE_TOKEN if immediate updates are required."
- fi
- done