mirror of
https://github.com/brain-hackers/brain-config.git
synced 2025-12-25 06:34:17 +09:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d56ab542d | ||
|
|
fa95e2cc34 | ||
|
|
b0d5844bb0 | ||
|
|
9f958410d2 | ||
|
|
cab14caada | ||
|
|
5cb856ce1d | ||
|
|
9b8b93f313 | ||
|
|
98aa4c1b12 | ||
|
|
30d4cad281 | ||
|
|
5e5f25b711 | ||
|
|
7cc2ada25d |
9
.github/archive_name.py
vendored
9
.github/archive_name.py
vendored
@@ -1,9 +0,0 @@
|
|||||||
#!/usr/bin/python3
|
|
||||||
|
|
||||||
with open('./debian/brain-config/DEBIAN/control', 'r') as f:
|
|
||||||
for l in f.readlines():
|
|
||||||
if l.startswith('Version:'):
|
|
||||||
print(f'brain-config_{l.replace("Version: ", "").rstrip()}_all.deb', end='')
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
raise RuntimeError('Version line was not found')
|
|
||||||
96
.github/workflows/build.yml
vendored
96
.github/workflows/build.yml
vendored
@@ -35,46 +35,62 @@ jobs:
|
|||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Create release
|
- name: Create release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: actions/create-release@v1
|
||||||
with:
|
|
||||||
body_path: CHANGES.md
|
|
||||||
draft: false
|
|
||||||
prerelease: true
|
|
||||||
name: ${{ steps.release_name.outputs.name }}
|
|
||||||
tag_name: ${{ env.RELEASE_TAG_NAME }}
|
|
||||||
|
|
||||||
build-linux:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs: [create_release]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
- name: Workaround for apt update failure
|
|
||||||
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
|
||||||
- name: Prepare packaging & packagecloud CLI
|
|
||||||
run: |
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install debhelper ruby-dev
|
|
||||||
sudo gem install package_cloud
|
|
||||||
- name: Build the Debian package
|
|
||||||
run: ./debian/rules build && sudo ./debian/rules binary
|
|
||||||
- name: Generate archive name
|
|
||||||
id: archive_name
|
|
||||||
run: echo ::set-output name=name::$(python .github/archive_name.py)
|
|
||||||
- name: Upload the package to GitHub
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
tag_name: ${{ env.RELEASE_TAG_NAME }}
|
||||||
asset_path: ../${{ steps.archive_name.outputs.name }}
|
release_name: ${{ steps.release_name.outputs.name }}
|
||||||
asset_name: ${{ steps.archive_name.outputs.name }}
|
body_path: CHANGES.md
|
||||||
asset_content_type: application/vnd.debian.binary-package
|
draft: false
|
||||||
- name: Upload the package to packagecloud
|
prerelease: true
|
||||||
env:
|
|
||||||
USERNAME: brainhackers
|
# build-linux:
|
||||||
REPO: brainux/any/any
|
# runs-on: ubuntu-20.04
|
||||||
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
|
# needs: [create_release]
|
||||||
run: |
|
# steps:
|
||||||
package_cloud push "${USERNAME}/${REPO}" "../${{steps.archive_name.outputs.name}}"
|
# - uses: actions/checkout@v2
|
||||||
|
# with:
|
||||||
|
# submodules: true
|
||||||
|
# - name: Workaround for apt update failure
|
||||||
|
# run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
||||||
|
# - name: Install deps
|
||||||
|
# run: sudo apt update && sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi qemu-user-static debootstrap python3-pip
|
||||||
|
# - name: Upgrade pip and setuptools
|
||||||
|
# run: pip3 install -U pip setuptools
|
||||||
|
# - name: Install listconfig
|
||||||
|
# run: pip3 install listconfig
|
||||||
|
# - name: Configure for Linux
|
||||||
|
# run: make ldefconfig
|
||||||
|
# - name: Build Linux
|
||||||
|
# run: make lbuild
|
||||||
|
# - name: Setup releases
|
||||||
|
# id: release_name
|
||||||
|
# run: |
|
||||||
|
# mkdir release
|
||||||
|
# cp ./linux-brain/arch/arm/boot/dts/imx28-pwsh*.dtb release/
|
||||||
|
# cp ./linux-brain/arch/arm/boot/zImage release/zImage
|
||||||
|
# zip -r release.zip release/
|
||||||
|
# - name: Generate archive name
|
||||||
|
# id: archive_name
|
||||||
|
# run: echo ::set-output name=name::linux-${GITHUB_REF/refs\/*s\//}
|
||||||
|
# - name: Upload release.zip
|
||||||
|
# uses: actions/upload-release-asset@v1
|
||||||
|
# env:
|
||||||
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# with:
|
||||||
|
# upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
|
# asset_path: release.zip
|
||||||
|
# asset_name: ${{ steps.archive_name.outputs.name }}.zip
|
||||||
|
# asset_content_type: application/zip
|
||||||
|
# - name: Generate listconfig
|
||||||
|
# run: listconfig ./linux-brain/Kconfig ./linux-brain/.config > listconfig
|
||||||
|
# - name: Upload listconfig
|
||||||
|
# uses: actions/upload-release-asset@v1
|
||||||
|
# env:
|
||||||
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# with:
|
||||||
|
# upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
|
# asset_path: listconfig
|
||||||
|
# asset_name: listconfig
|
||||||
|
# asset_content_type: text/plain
|
||||||
|
|||||||
Reference in New Issue
Block a user