feat: Change CI logic
Some checks failed
CI / test (push) Successful in 41s
Release / Build and release (push) Has been cancelled

This commit is contained in:
NikitolProject
2026-02-25 03:19:16 +03:00
parent 96048f31f2
commit b9ed446deb
2 changed files with 17 additions and 81 deletions

View File

@@ -6,19 +6,9 @@ on:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
build:
name: Build ${{ matrix.target }}
release:
name: Build and release
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: x86_64-unknown-linux-musl
artifact: encrypted_archive-linux-amd64
- target: aarch64-unknown-linux-musl
artifact: encrypted_archive-linux-arm64
- target: x86_64-pc-windows-gnu
artifact: encrypted_archive-windows-amd64.exe
steps:
- uses: actions/checkout@v4
@@ -28,83 +18,29 @@ jobs:
- name: Install cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build release binary
run: cross build --release --target ${{ matrix.target }}
- name: Build linux-amd64
run: cross build --release --target x86_64-unknown-linux-musl
- name: Rename binary
run: |
src="target/${{ matrix.target }}/release/encrypted_archive"
if [ "${{ matrix.target }}" = "x86_64-pc-windows-gnu" ]; then
src="${src}.exe"
fi
cp "$src" "${{ matrix.artifact }}"
- name: Build linux-arm64
run: cross build --release --target aarch64-unknown-linux-musl
- name: Generate SHA-256
run: sha256sum "${{ matrix.artifact }}" > "${{ matrix.artifact }}.sha256"
- name: Build windows-amd64
run: cross build --release --target x86_64-pc-windows-gnu
- name: Upload artifact
uses: https://gitea.com/actions/upload-artifact@v3
with:
name: ${{ matrix.artifact }}
path: |
${{ matrix.artifact }}
${{ matrix.artifact }}.sha256
package-decoders:
name: Package decoders
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Package shell decoder
run: |
cp shell/decode.sh decode.sh
sha256sum decode.sh > decode.sh.sha256
- name: Package Kotlin decoder
run: |
cp kotlin/ArchiveDecoder.kt ArchiveDecoder.kt
sha256sum ArchiveDecoder.kt > ArchiveDecoder.kt.sha256
- name: Upload shell decoder
uses: https://gitea.com/actions/upload-artifact@v3
with:
name: decode.sh
path: |
decode.sh
decode.sh.sha256
- name: Upload Kotlin decoder
uses: https://gitea.com/actions/upload-artifact@v3
with:
name: ArchiveDecoder.kt
path: |
ArchiveDecoder.kt
ArchiveDecoder.kt.sha256
release:
name: Create release
needs: [build, package-decoders]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: https://gitea.com/actions/download-artifact@v3
with:
path: artifacts/
- name: Collect release files
- name: Collect release artifacts
run: |
mkdir -p release
find artifacts/ -type f -exec cp {} release/ \;
ls -la release/
cp target/x86_64-unknown-linux-musl/release/encrypted_archive release/encrypted_archive-linux-amd64
cp target/aarch64-unknown-linux-musl/release/encrypted_archive release/encrypted_archive-linux-arm64
cp target/x86_64-pc-windows-gnu/release/encrypted_archive.exe release/encrypted_archive-windows-amd64.exe
cp kotlin/ArchiveDecoder.kt release/
cp shell/decode.sh release/
cd release && sha256sum * > SHA256SUMS
- name: Create release
uses: https://gitea.com/actions/gitea-release-action@v1
with:
files: release/*
sha256sum: false
body: |
## encrypted_archive ${{ gitea.ref_name }}
@@ -117,5 +53,4 @@ jobs:
| `encrypted_archive-windows-amd64.exe` | Windows x86_64 |
| `ArchiveDecoder.kt` | Kotlin/Android decoder (source) |
| `decode.sh` | POSIX shell decoder (requires OpenSSL) |
Each binary has a corresponding `.sha256` checksum file.
| `SHA256SUMS` | Checksums for all files |

1
.gitignore vendored
View File

@@ -1 +1,2 @@
/target
*.jar