From 3b10918f719d9c5fd2378a5b4775d56abe16da1f Mon Sep 17 00:00:00 2001 From: hard-nett Date: Tue, 19 Mar 2024 19:57:53 -0400 Subject: [PATCH] update release workflow --- .github/workflows/release.yml | 54 +++++++++++++++++------------------ 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e09014f..d5ec48a1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,35 +1,33 @@ ---- -name: release binary +# This workflow creates a release using goreleaser +# via the 'make release' command. + +name: Create release on: - release: - types: [created] + workflow_dispatch: + inputs: + release_tag: + description: "The desired tag for the release (e.g. v0.1.0)." + required: true + +permissions: + contents: write jobs: - release-alpine-static: - permissions: write-all - runs-on: ubuntu-latest + release: + name: Create release + runs-on: buildjet-4vcpu-ubuntu-2204 steps: - - name: Checkout + - name: Check out repository code uses: actions/checkout@v4 - - - name: Docker compose - run: STAKE_TOKEN="uterp" TIMEOUT_COMMIT=500ms docker-compose up -d - - - name: Copy binary - run: docker cp terpd_node_1:/usr/bin/terpd ./terpd - - - name: Save sha256 sum - run: sha256sum ./terpd > ./terpd_sha256.txt - - - name: Release - uses: softprops/action-gh-release@v1 with: - token: ${{ github.token }} - files: | - terpd - terpd_sha256.txt - - - name: Dump docker logs on failure - if: failure() - uses: jwalton/gh-docker-logs@v2 + fetch-depth: 0 + ref: ${{ github.event.inputs.release_tag }} + - name: Make release + run: | + make release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: 🧹 Clean release folder + run: | + sudo rm -rf dist \ No newline at end of file