release #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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%%-*}" | |
| echo "Creating release for version: ${VERSION}" | |
| TAG="v${VERSION}" | |
| gh release create "${TAG}" \ | |
| --title "Release ${TAG}" \ | |
| --notes "Automated release for version ${TAG}" \ | |
| artifacts/linux-amd64/** | |
| artifacts/linux-arm64/** | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |