Skip to content

release

release #16

Workflow file for this run

name: release
on:
workflow_dispatch:
permissions:
contents: write
actions: read
packages: write
jobs:
release:
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get version from changelog
id: changelog
uses: ./.github/actions/get-deb-version
with:
path: "."
- name: Download linux-amd64 artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: ci-build.yml
workflow_conclusion: success
branch: embtom/main
name: build-linux-amd64-${{ steps.changelog.outputs.version }}
path: ./artifacts/linux-amd64
- name: Download linux-arm64 artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: ci-build.yml
workflow_conclusion: success
branch: embtom/main
name: build-linux-arm64-${{ steps.changelog.outputs.version }}
path: ./artifacts/linux-arm64
- name: List downloaded files
run: |
echo "Artifacts downloaded:"
find artifacts -type f -exec readlink -f {} \;
- name: Create GitHub Release
run: |
VERSION="${{ steps.changelog.outputs.version }}"
VERSION="${VERSION%%-*}"
TAG="v${VERSION}"
echo "Creating release for ${TAG}"
shopt -s globstar nullglob
ASSETS=(
artifacts/linux-amd64/build/**/*
artifacts/linux-amd64/dist/**/*
artifacts/linux-arm64/build/**/*
artifacts/linux-arm64/dist/**/*
)
echo "Uploading ${#ASSETS[@]} assets"
gh release create "$TAG" \
--title "Release $TAG" \
--notes "Automated release for version $TAG" \
"${ASSETS[@]}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}