举个例子
github Actions
可以实现上面的问题
实际的问题应用可以看这里的文件 main.yml
我取其中一部分,做个说明
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| name: AutoPkg
on: push: branches: [ "master" ] pull_request: branches: [ "master" ]
env: TAG_NAME: "自动打包" SOFTWARE_NAME: "ldr-translate"
jobs:
build-ldr-linux:
runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3
- name: Prepare run: |
rm -rf disk make clear echo
- name: Build rpm package run: | sudo apt update -y
sudo apt-get install -y rpm
make rpm-gtk && make rpm-qt
- name: Create Release and Upload Release Asset uses: softprops/action-gh-release@v1 with: tag_name: ${{ env.TAG_NAME }} prerelease: true draft: false files: | disk/*
|
实际应用的时候,建议写成 Makefile
,然后在这里只是调用 make
命令,自己在电脑上测试也方便,
具体的可以参见
GitHub - yuhldr/ldr-translate
本文作者:yuhldr
本文地址: https://yuhldr.github.io/posts/dabdcea.html
版权声明:转载请注明出处!