ci: build Linux release package
Some checks failed
Build Linux Release / build-linux (push) Has been cancelled
Some checks failed
Build Linux Release / build-linux (push) Has been cancelled
This commit is contained in:
49
.gitea/workflows/build-linux-release.yml
Normal file
49
.gitea/workflows/build-linux-release.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
name: Build Linux Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- 'v*'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install host tools
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
bzip2 \
|
||||
tar \
|
||||
file
|
||||
|
||||
- name: Build release package
|
||||
run: |
|
||||
chmod +x scripts/*.sh
|
||||
./scripts/package-linux-release.sh
|
||||
|
||||
- name: Verify package
|
||||
run: |
|
||||
test -s dist-linux/chengnan-linux-x86_64.tar.gz
|
||||
sha256sum -c dist-linux/chengnan-linux-x86_64.tar.gz.sha256
|
||||
tar -tzf dist-linux/chengnan-linux-x86_64.tar.gz | grep -E '^chengnan-linux-x86_64/(bin/chengnan|run-chengnan.sh)$'
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: chengnan-linux-x86_64
|
||||
path: |
|
||||
dist-linux/chengnan-linux-x86_64.tar.gz
|
||||
dist-linux/chengnan-linux-x86_64.tar.gz.sha256
|
||||
if-no-files-found: error
|
||||
Reference in New Issue
Block a user