Skip to content

release

release #21

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: Prepare version tag
id: prepare-tag
run: |
VERSION="${{ steps.changelog.outputs.version }}"
VERSION="embtom-${VERSION%%-*}"
echo "Prepared version: ${VERSION}"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: Create zip archives
shell: bash
run: |
for ARCH in linux-amd64 linux-arm64; do
echo "Zipping $ARCH..."
zip -r "artifacts/${ARCH}-debian.zip" "artifacts/${ARCH}/build"
done
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.prepare-tag.outputs.version }}
name: Release ${{ steps.prepare-tag.outputs.version }}
files: |
artifacts/linux-amd64/dist/**
artifacts/linux-arm64/dist/**
artifacts/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}