Add build workflow
This commit is contained in:
parent
90f470c1a6
commit
50b7b873e3
1 changed files with 84 additions and 0 deletions
84
.github/workflows/build.yaml
vendored
Normal file
84
.github/workflows/build.yaml
vendored
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
name: build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
|
matrix:
|
||||||
|
arch: [x86_64, x86_64-musl]
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
env:
|
||||||
|
XBPS_PASSPHRASE: ${{ secrets.SIGN_PASS }}
|
||||||
|
XBPS_TARGET_ARCH: ${{ matrix.arch }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: checkout local templates
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: master
|
||||||
|
path: added-packages
|
||||||
|
|
||||||
|
- name: checkout void-packages
|
||||||
|
uses: classabbyamp/treeless-checkout-action@v1
|
||||||
|
with:
|
||||||
|
repository: void-linux/void-packages
|
||||||
|
ref: master
|
||||||
|
path: void-packages
|
||||||
|
|
||||||
|
- name: copy
|
||||||
|
run: cp -rv added-packages/srcpkgs/* void-packages/srcpkgs
|
||||||
|
|
||||||
|
- name: prepare xbps-static
|
||||||
|
run: |
|
||||||
|
mkdir -p /opt/xbps
|
||||||
|
curl -LO http://repo-default.voidlinux.org/static/xbps-static-latest.x86_64-musl.tar.xz
|
||||||
|
tar xvf xbps-static-latest.x86_64-musl.tar.xz -C /opt/xbps
|
||||||
|
rm xbps-static-latest.x86_64-musl.tar.xz
|
||||||
|
|
||||||
|
- name: Prepare masterdir
|
||||||
|
run: |
|
||||||
|
export PATH="/tmp/bin:/opt/xbps/usr/bin/:$PATH"
|
||||||
|
common/travis/set_mirror.sh &&
|
||||||
|
common/travis/fetch-xtools.sh
|
||||||
|
|
||||||
|
- name: free space
|
||||||
|
run: |
|
||||||
|
sudo rm -rf /usr/share/dotnet
|
||||||
|
sudo rm -rf /usr/local/lib/android
|
||||||
|
sudo rm -rf /opt/ghc
|
||||||
|
sudo rm -rf /opt/hostedtoolcache/CodeQL
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
run: |
|
||||||
|
export PATH="/tmp/bin:/opt/xbps/usr/bin/:$PATH"
|
||||||
|
cd void-packages
|
||||||
|
./xbps-src -m masterdir-${{ matrix.arch }} -A ${{ matrix.arch }} binary-bootstrap
|
||||||
|
./xbps-src pkg -j4 -m masterdir-${{ matrix.arch }} dotter-bin
|
||||||
|
|
||||||
|
- name: sign
|
||||||
|
working-directory: void-packages/hostdir/binpkgs/
|
||||||
|
run: |
|
||||||
|
export PATH="/tmp/bin:/opt/xbps/usr/bin/:$PATH"
|
||||||
|
xbps-rindex -r $PWD
|
||||||
|
xbps-rindex -s --signedby <(printf '%s' "${{ secrets.SIGNER }}") --privkey <(printf '%s' "${{ secrets.PRIV_KEY }}") $PWD
|
||||||
|
xbps-rindex -S --privkey <(printf '%s' "${{ secrets.PRIV_KEY }}") $PWD/*.xbps
|
||||||
|
xbps-rindex -c $PWD
|
||||||
|
|
||||||
|
- name: checksum
|
||||||
|
working-directory: void-packages/hostdir/binpkgs/
|
||||||
|
run: |
|
||||||
|
sha256sum $(echo dotter-bin-*.${{ matrix.arch }}.xbps) | tee $(echo dotter-bin-*.${{ matrix.arch }}.xbps).sha256sum
|
||||||
|
sha512sum $(echo dotter-bin-*.${{ matrix.arch }}.xbps) | tee $(echo dotter-bin-*.${{ matrix.arch }}.xbps).sha512sum
|
||||||
|
|
||||||
|
- name: release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
void-packages/hostdir/binpkgs/*.xbps
|
||||||
|
void-packages/hostdir/binpkgs/*.sig2
|
||||||
|
void-packages/hostdir/binpkgs/*repodata
|
Loading…
Reference in a new issue