Skip to content

Commit 58d6830

Browse files
committed
ci: reverted uploading release assets in release.yml as it turns out to be used in dist/test_kit_docker_build.sh
1 parent 6c4be4c commit 58d6830

1 file changed

Lines changed: 207 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 207 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,14 +503,218 @@ jobs:
503503
name: artifact-extra-rpm-el10
504504
path: ./artifacts/*.el10.noarch.rpm
505505

506-
deploy:
506+
create-release:
507+
runs-on: ubuntu-22.04
508+
permissions:
509+
contents: write
510+
pull-requests: write
511+
repository-projects: write
507512
needs:
508-
- pack
509513
- build-artifact
510514
- build-artifact-dev
511-
- build-extra-packages
512515
- build-linux-packages
513516
- build-linux-packages-arm64
517+
- build-extra-packages
518+
steps:
519+
- uses: actions/checkout@v3
520+
with:
521+
fetch-depth: 0
522+
- name: Generate changelog
523+
run: |
524+
curl -sSL https://github.com/git-chglog/git-chglog/releases/download/v0.15.1/git-chglog_0.15.1_linux_amd64.tar.gz | tar -xzf -
525+
chmod +x git-chglog
526+
./git-chglog --output ./CHANGELOG.md $(git describe --tags $(git rev-list --tags --max-count=1))
527+
528+
- name: Create Release
529+
id: create-release
530+
uses: actions/create-release@v1
531+
env:
532+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
533+
with:
534+
tag_name: ${{ github.ref }}
535+
release_name: ${{ github.ref }}
536+
body_path: ./CHANGELOG.md
537+
draft: false
538+
prerelease: true
539+
540+
- name: Write upload_url to file
541+
run: echo '${{ steps.create-release.outputs.upload_url }}' > upload_url.txt
542+
543+
- uses: manticoresoftware/upload_artifact_with_retries@main
544+
with:
545+
name: create-release
546+
path: upload_url.txt
547+
548+
upload-release:
549+
runs-on: ubuntu-22.04
550+
needs: create-release
551+
strategy:
552+
matrix:
553+
include:
554+
- artifact_suffix: ubuntu-22.04-amd64
555+
asset_name_suffix: linux-amd64.tar.gz
556+
asset_content_type: application/gzip
557+
- artifact_suffix: ubuntu-22.04-arm64
558+
asset_name_suffix: linux-arm64.tar.gz
559+
asset_content_type: application/gzip
560+
- artifact_suffix: macos-13-x86_64
561+
asset_name_suffix: macos-x86_64.tar.gz
562+
asset_content_type: application/gzip
563+
- artifact_suffix: macos-14-arm64
564+
asset_name_suffix: macos-arm64.tar.gz
565+
asset_content_type: application/gzip
566+
- artifact_suffix: dev-ubuntu-22.04-amd64
567+
asset_name_suffix: linux-amd64-dev.tar.gz
568+
asset_content_type: application/gzip
569+
steps:
570+
- uses: manticoresoftware/download_artifact_with_retries@main
571+
with:
572+
name: artifact-${{ matrix.artifact_suffix }}
573+
path: .
574+
575+
- uses: manticoresoftware/download_artifact_with_retries@main
576+
with:
577+
name: create-release
578+
path: .
579+
580+
- id: vars
581+
run: |
582+
echo "upload_url=$(cat upload_url.txt)" >> $GITHUB_OUTPUT
583+
echo "asset_path=$(ls *${{ matrix.asset_name_suffix }} | head -n 1)" >> $GITHUB_OUTPUT
584+
585+
- name: Upload Release Asset
586+
id: upload-release-asset
587+
uses: actions/upload-release-asset@v1
588+
env:
589+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
590+
with:
591+
upload_url: ${{ steps.vars.outputs.upload_url }}
592+
asset_path: ${{ steps.vars.outputs.asset_path }}
593+
asset_name: ${{ steps.vars.outputs.asset_path }}
594+
asset_content_type: ${{ matrix.asset_content_type }}
595+
596+
upload-linux-packages:
597+
runs-on: ubuntu-22.04
598+
needs: create-release
599+
strategy:
600+
matrix:
601+
include:
602+
- pkg: deb
603+
suffix: "amd64"
604+
asset_content_type: application/vnd.debian.binary-package
605+
- pkg: deb
606+
suffix: "arm64"
607+
asset_content_type: application/vnd.debian.binary-package
608+
- pkg: rpm
609+
suffix: "el8-amd64"
610+
asset_content_type: application/x-rpm
611+
- pkg: rpm
612+
suffix: "el9-amd64"
613+
asset_content_type: application/x-rpm
614+
- pkg: rpm
615+
suffix: "el10-amd64"
616+
asset_content_type: application/x-rpm
617+
- pkg: rpm
618+
suffix: "el8-aarch64"
619+
asset_content_type: application/x-rpm
620+
- pkg: rpm
621+
suffix: "el9-aarch64"
622+
asset_content_type: application/x-rpm
623+
- pkg: rpm
624+
suffix: "el10-aarch64"
625+
asset_content_type: application/x-rpm
626+
steps:
627+
- uses: manticoresoftware/download_artifact_with_retries@main
628+
with:
629+
name: artifact-${{ matrix.pkg }}-${{ matrix.suffix }}
630+
path: .
631+
632+
- uses: manticoresoftware/download_artifact_with_retries@main
633+
with:
634+
name: create-release
635+
path: .
636+
637+
- id: vars
638+
run: |
639+
asset_path=$(ls ./artifacts/*.${{ matrix.pkg }} | head -n 1)
640+
echo "upload_url=$(cat upload_url.txt)" >> $GITHUB_OUTPUT
641+
echo "asset_path=$asset_path" >> $GITHUB_OUTPUT
642+
echo "asset_name=$(basename $asset_path)" >> $GITHUB_OUTPUT
643+
644+
- name: Upload Release Asset
645+
id: upload-release-asset
646+
uses: actions/upload-release-asset@v1
647+
env:
648+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
649+
with:
650+
upload_url: ${{ steps.vars.outputs.upload_url }}
651+
asset_path: ${{ steps.vars.outputs.asset_path }}
652+
asset_name: ${{ steps.vars.outputs.asset_name }}
653+
asset_content_type: ${{ matrix.asset_content_type }}
654+
655+
upload-extra-packages:
656+
runs-on: ubuntu-22.04
657+
needs: create-release
658+
strategy:
659+
matrix:
660+
include:
661+
- pkg: deb
662+
suffix: ""
663+
asset_content_type: application/vnd.debian.binary-package
664+
- pkg: rpm
665+
suffix: "-el8"
666+
asset_content_type: application/x-rpm
667+
- pkg: rpm
668+
suffix: "-el9"
669+
asset_content_type: application/x-rpm
670+
- pkg: rpm
671+
suffix: "-el10"
672+
asset_content_type: application/x-rpm
673+
steps:
674+
# We download amd64 only but just because of noarch
675+
- uses: manticoresoftware/download_artifact_with_retries@main
676+
with:
677+
name: artifact-extra-${{ matrix.pkg }}${{ matrix.suffix }}
678+
path: .
679+
680+
- uses: manticoresoftware/download_artifact_with_retries@main
681+
with:
682+
name: create-release
683+
path: .
684+
685+
- name: Prepare package names
686+
run: |
687+
file=$(ls ./artifacts/*.${{ matrix.pkg }} | head -n 1)
688+
mv "$file" artifact
689+
rm -f *.${{ matrix.pkg }}
690+
file=${file/amd64/all}
691+
file=${file/x86_64/noarch}
692+
mv artifact "$file"
693+
shell: bash
694+
- id: vars
695+
run: |
696+
asset_path=$(ls ./artifacts/*.${{ matrix.pkg }} | head -n 1)
697+
echo "upload_url=$(cat upload_url.txt)" >> $GITHUB_OUTPUT
698+
echo "asset_path=$asset_path" >> $GITHUB_OUTPUT
699+
echo "asset_name=$(basename $asset_path)" >> $GITHUB_OUTPUT
700+
701+
- name: Upload Release Asset
702+
id: upload-release-asset
703+
uses: actions/upload-release-asset@v1
704+
env:
705+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
706+
with:
707+
upload_url: ${{ steps.vars.outputs.upload_url }}
708+
asset_path: ${{ steps.vars.outputs.asset_path }}
709+
asset_name: ${{ steps.vars.outputs.asset_name }}
710+
asset_content_type: ${{ matrix.asset_content_type }}
711+
712+
deploy:
713+
needs:
714+
- pack
715+
- upload-release
716+
- upload-linux-packages
717+
- upload-extra-packages
514718
runs-on: ubuntu-22.04
515719
env:
516720
target: ${{ needs.pack.outputs.target }}

0 commit comments

Comments
 (0)