-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hard-nett
committed
Mar 19, 2024
1 parent
3c3cc45
commit 3b10918
Showing
1 changed file
with
26 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |