Skip to content

downloads the image separately #13

downloads the image separately

downloads the image separately #13

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
jobs:
build-artifacts:
runs-on: ubuntu-latest
container:
image: ghcr.io/vanilla-os/pico:dev
permissions:
contents: read
steps:
- uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Install Build Dependencies
run: |
dpkg --add-architecture arm64
apt-get update
apt-get install -y libbtrfs-dev libdevmapper-dev libgpgme-dev libdpkg-dev gcc patch pkgconf libdevmapper-dev:arm64 libdpkg-dev:arm64 gcc-aarch64-linux-gnu
- name: Build
run: |
go build -o abrootv2 -ldflags="-X 'main.Version=${{ github.ref_name }}'"
tar -czvf abrootv2-amd64.tar.gz abrootv2
apt-get install -y libgpgme-dev:arm64
GOARCH=arm64 CGO_ENABLED=1 CC=aarch64-linux-gnu-gcc PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig go build -o abrootv2 -ldflags="-X 'main.Version=${{ github.ref_name }}'"
tar -czvf abrootv2-arm64.tar.gz abrootv2
tar -czvf abroot-man.tar.gz man/man1/abroot.1
- name: Calculate and Save Checksums
run: |
sha256sum abrootv2*.tar.gz >> checksums.txt
sha256sum abroot-man.tar.gz >> checksums.txt
- uses: actions/upload-artifact@v6
with:
name: abroot
path: |
abrootv2*.tar.gz
abroot-man.tar.gz
checksums.txt
release:
runs-on: ubuntu-latest
needs: build-artifacts
permissions:
contents: write # to create and upload assets to releases
attestations: write # to upload assets attestation for build provenance
id-token: write # grant additional permission to attestation action to mint the OIDC token permission
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Download Artifact
uses: actions/download-artifact@v7
with:
name: abroot
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create "${{ github.ref_name }}" --generate-notes *.tar.gz checksums.txt
- name: Attest Release Files
id: attest
uses: actions/attest-build-provenance@v3
with:
subject-path: '*.tar.gz, checksums.txt'