From 19fc8d11854c1a9b872b00bef082c0318bb67dfb Mon Sep 17 00:00:00 2001 From: ostiwe Date: Wed, 29 Oct 2025 20:22:46 +0300 Subject: [PATCH] ci: Update release --- .github/workflows/release.yml | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index af31281..291b5a3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,28 +14,19 @@ jobs: name: Sematic Release runs-on: self-hosted outputs: - tmpFileName: ${{ steps.tempFileName.outputs.name }} + releaseContentLink: ${{ steps.release.outputs.releaseContentLink }} steps: - - name: Generate tempFile Name - id: tempFileName - run: | - echo "name=$(openssl rand -hex 36)" >> "$GITHUB_OUTPUT" - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: Release - env: - TMP_FILE_NAME: ${{ steps.tempFileName.outputs.name }} + id: release run: | + export TMP_FILE_NAME=$(openssl rand -hex 36) yarn install yarn semantic-release - - name: Upload release artifact - uses: https://github.com/christopherHX/gitea-upload-artifact@v4 - with: - name: 'ReleaseArtifact' - path: /tmp/${{ steps.tempFileName.outputs.name }} - retention-days: 2 + echo "releaseContentLink=$(cat /tmp/$TMP_FILE_NAME | curl -F '_=<-' https://past.ostiwe.com)" >> "$GITHUB_OUTPUT" goreleaser: needs: semantic-release name: Goreleaser @@ -51,13 +42,15 @@ jobs: go-version: '^1.25' - name: Install go release run: go install github.com/goreleaser/goreleaser/v2@latest - - name: Download release artifact - uses: actions/download-artifact@v5 - with: - name: 'ReleaseArtifact' - path: /tmp/${{ needs.semantic-release.outputs.tmpFileName }} + - name: Get release notes + id: get-notes + run: | + export FILE_NAME=$(openssl rand -hex 36) + echo "name=$FILE_NAME" >> "$GITHUB_OUTPUT + curl -L ${{ needs.semantic-release.outputs.releaseContentLink }} >> "/tmp/$FILE_NAME" - name: Run Goreleaser env: GITEA_TOKEN: ${{ secrets.GORELEASER_TOKEN }} run: | - goreleaser release --release-notes /tmp/${{ needs.semantic-release.outputs.tmpFileName }} --clean \ No newline at end of file + goreleaser release --release-notes /tmp/${{ steps.get-notes.outputs.name }} --clean + rm /tmp/${{ steps.get-notes.outputs.name }} \ No newline at end of file