From 77e561af72bd7e148603f1832a2b4da4fd70cf36 Mon Sep 17 00:00:00 2001 From: Stefan Benz <46600784+stebenz@users.noreply.github.com> Date: Fri, 11 Aug 2023 14:49:28 +0200 Subject: [PATCH] chore: add assets to releases (#6346) * chore: change pipeline to add assets to the release --- .github/workflows/compile.yml | 6 ++--- .github/workflows/container.yml | 2 +- .github/workflows/e2e.yml | 2 +- .github/workflows/version.yml | 5 +++++ .releaserc.js | 40 ++++++++++++++++++++++++++++++--- 5 files changed, 47 insertions(+), 8 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 10baaae966..47b85f9d87 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -70,12 +70,12 @@ jobs: mv zitadel zitadel-${{ matrix.goos }}-${{ matrix.goarch }}/ cp LICENSE zitadel-${{ matrix.goos }}-${{ matrix.goarch }}/ cp README.md zitadel-${{ matrix.goos }}-${{ matrix.goarch }}/ - tar -cvf zitadel-${{ matrix.goos }}-${{ matrix.goarch }}.tar zitadel-${{ matrix.goos }}-${{ matrix.goarch }} + tar -czvf zitadel-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz zitadel-${{ matrix.goos }}-${{ matrix.goarch }} - uses: actions/upload-artifact@v3 with: name: zitadel-${{ matrix.goos }}-${{ matrix.goarch }} - path: zitadel-${{ matrix.goos }}-${{ matrix.goarch }}.tar + path: zitadel-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz checksums: runs-on: ubuntu-latest @@ -87,7 +87,7 @@ jobs: path: executables - name: move files one folder up - run: mv */*.tar . && find . -type d -empty -delete + run: mv */*.tar.gz . && find . -type d -empty -delete working-directory: executables - run: sha256sum * > checksums.txt diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index 015831f5c3..cf13890d56 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -70,7 +70,7 @@ jobs: - name: Unpack executable run: | - tar -xvf .artifacts/zitadel-linux-${{ matrix.arch }}.tar + tar -xvf .artifacts/zitadel-linux-${{ matrix.arch }}.tar.gz mv zitadel-linux-${{ matrix.arch }}/zitadel ./zitadel - name: Debug diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ea92872ddb..5310d743db 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -22,7 +22,7 @@ jobs: - name: Unpack executable run: | - tar -xvf .artifacts/zitadel-linux-amd64.tar + tar -xvf .artifacts/zitadel-linux-amd64.tar.gz mv zitadel-linux-amd64/zitadel ./zitadel - name: Set up QEMU diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index a5c8635488..abf5f44807 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -27,6 +27,11 @@ jobs: - name: Source checkout uses: actions/checkout@v3 + - + uses: actions/download-artifact@v3 + if: ${{ !inputs.dry_run }} + with: + path: .artifacts - name: Semantic Release uses: cycjimmy/semantic-release-action@v3 diff --git a/.releaserc.js b/.releaserc.js index 0cafc991a6..6716a53f73 100644 --- a/.releaserc.js +++ b/.releaserc.js @@ -1,11 +1,45 @@ module.exports = { branches: [ { name: "next" }, - { name: "next-rc", prerelease: "rc" } + { name: "next-rc", prerelease: "rc" }, ], plugins: [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", - "@semantic-release/github" - ] + [ + "@semantic-release/github", + { + assets: [ + { + path: ".artifacts/zitadel-linux-amd64/zitadel-linux-amd64.tar.gz", + label: "zitadel-linux-amd64.tar.gz", + }, + { + path: ".artifacts/zitadel-linux-arm64/zitadel-linux-arm64.tar.gz", + label: "zitadel-linux-arm64.tar.gz", + }, + { + path: ".artifacts/zitadel-windows-amd64/zitadel-windows-amd64.tar.gz", + label: "zitadel-windows-amd64.tar.gz", + }, + { + path: ".artifacts/zitadel-windows-arm64/zitadel-windows-arm64.tar.gz", + label: "zitadel-windows-arm64.tar.gz", + }, + { + path: ".artifacts/zitadel-darwin-amd64/zitadel-darwin-amd64.tar.gz", + label: "zitadel-darwin-amd64.tar.gz", + }, + { + path: ".artifacts/zitadel-darwin-arm64/zitadel-darwin-arm64.tar.gz", + label: "zitadel-darwin-arm64.tar.gz", + }, + { + path: ".artifacts/checksums.txt", + label: "checksums.txt", + } + ], + }, + ], + ], };