From a575691d34ea29252141960df518b789ab8c663c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20V=C3=A1rady?= Date: Thu, 17 Oct 2024 14:37:39 +0200 Subject: [PATCH] reupload --- .github/workflows/draft-release.yml | 96 --------------------------- .github/workflows/upload-packages.yml | 14 +++- 2 files changed, 11 insertions(+), 99 deletions(-) diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 670d9f84cc..758b269902 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -18,8 +18,6 @@ permissions: write-all on: workflow_dispatch: - pull_request: - types: [closed] env: @@ -30,61 +28,7 @@ env: jobs: - create-release-tarball: - runs-on: ubuntu-latest - if: (github.event_name == 'workflow_dispatch') || - (github.event.pull_request.merged && contains(github.event.pull_request.labels.*.name, 'version-bump')) - outputs: - RELEASE_TAG: ${{ steps.setup-environment.outputs.RELEASE_TAG }} - RELEASE_NAME: ${{ steps.setup-environment.outputs.RELEASE_NAME }} - TARBALL_NAME: ${{ steps.setup-environment.outputs.TARBALL_NAME }} - steps: - - name: Checkout AxoSyslog source - uses: actions/checkout@v4 - - - name: "Comment: job started" - if: github.event_name == 'pull_request' - run: | - COMMENT="${WORKFLOW_NAME} started: ${CURRENT_WORKFLOW_RUN_URL}." - - gh pr comment \ - "${{ github.event.number }}" \ - --body "${COMMENT}" - - - name: Setup environment - id: setup-environment - run: | - . .github/workflows/gh-tools.sh - - VERSION=`cat VERSION.txt` - RELEASE_TAG=axosyslog-$VERSION - RELEASE_NAME=${RELEASE_TAG} - TARBALL_NAME=${RELEASE_NAME}.tar.gz - TARBALL_PATH=dbld/release/${VERSION}/${TARBALL_NAME} - - gh_export VERSION RELEASE_TAG TARBALL_PATH - gh_output RELEASE_TAG RELEASE_NAME TARBALL_NAME - - - name: "DBLD: release" - run: | - ./dbld/rules release VERSION=${VERSION} - - - name: Store release tarball as artifact - uses: actions/upload-artifact@v4 - with: - name: release-tarball - path: ${{ env.TARBALL_PATH }} - if-no-files-found: error - - create-packages: - needs: create-release-tarball - uses: ./.github/workflows/create-packages.yml - with: - source-tarball-artifact-name: release-tarball - dbld-image-mode: build - upload-packages: - needs: create-packages uses: ./.github/workflows/upload-packages.yml with: pkg-type: stable @@ -92,43 +36,3 @@ jobs: r2-access-key: ${{ secrets.R2_ACCESS_KEY }} r2-secret-key: ${{ secrets.R2_SECRET_KEY }} r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} - - create-draft-release: - runs-on: ubuntu-latest - needs: [create-release-tarball, create-packages] # TODO replace with upload-packages - steps: - - name: Checkout AxoSyslog source - uses: actions/checkout@v4 - - - name: Download release tarball artifact - uses: actions/download-artifact@v4 - with: - name: release-tarball - - - name: Create draft release - run: | - gh release create \ - "${{ needs.create-release-tarball.outputs.RELEASE_TAG }}" \ - "${{ needs.create-release-tarball.outputs.TARBALL_NAME }}" \ - --draft \ - --title "${{ needs.create-release-tarball.outputs.RELEASE_NAME }}" \ - --notes-file "NEWS.md" - - comment-workflow-result: - runs-on: ubuntu-latest - needs: create-draft-release - if: always() && (github.event.pull_request.merged && contains(github.event.pull_request.labels.*.name, 'version-bump')) - steps: - - name: "Comment: job status" - run: | - if [[ "${{ needs.create-draft-release.result }}" = "success" ]] - then - COMMENT="${WORKFLOW_NAME} finished successfully. Please check the Releases page: ${RELEASES_URL}" - else - COMMENT="${WORKFLOW_NAME} failed." - fi - - gh pr comment \ - --repo "${{ github.repository }}" \ - "${{ github.event.number }}" \ - --body "${COMMENT}" diff --git a/.github/workflows/upload-packages.yml b/.github/workflows/upload-packages.yml index 6012f4cff2..18f329ff9a 100644 --- a/.github/workflows/upload-packages.yml +++ b/.github/workflows/upload-packages.yml @@ -18,7 +18,6 @@ on: "ubuntu-focal", "ubuntu-jammy", "ubuntu-noble", - "ubuntu-oracular", "ubuntu-lunar", "ubuntu-mantic" ]' @@ -48,18 +47,27 @@ jobs: - name: Download package artifact uses: actions/download-artifact@v4 with: + run-id: 10667805331 + github-token: ${{ github.token }} name: package-${{ matrix.distro }} path: package - name: Upload packages to R2 incoming working-directory: package run: | + for dir in ./*/; do + cd $dir + mkdir binary-amd64 + mv * binary-amd64 || true + cd .. + done + export AWS_ACCESS_KEY_ID='${{ secrets.r2-access-key }}' export AWS_SECRET_ACCESS_KEY='${{ secrets.r2-secret-key }}' export AWS_DEFAULT_REGION='auto' find * -type f -exec \ aws s3api put-object \ --endpoint-url https://${{ secrets.r2-account-id }}.r2.cloudflarestorage.com \ - --bucket axoflow-packages-build \ - --key ${{ inputs.pkg-type }}/${{ github.run_id }}/{} \ + --bucket axoflow-packages \ + --key apt/dists/${{ inputs.pkg-type }}/{} \ --body {} \;