release #213
Workflow file for this run
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
--- | |
name: release | |
defaults: | |
run: | |
shell: bash | |
# yamllint disable-line rule:truthy | |
on: | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: core-e2e | |
env: | |
DOCKER_CLI_EXPERIMENTAL: "enabled" | |
steps: | |
- name: Cleanup build folder | |
run: | | |
sudo rm -rf ./* || true | |
sudo rm -rf ./.??* || true | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Detect required Go version | |
run: | | |
toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//') | |
echo "GOVERSION=${toolchain}" >> $GITHUB_ENV | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "${{ env.GOVERSION }}" | |
- name: Setup direnv | |
uses: HatsuneMiku3939/direnv-action@v1 | |
with: | |
masks: '' | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: release version | |
run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
- name: Login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: release publish | |
run: | | |
sudo rm -rf dist | |
make release | |
env: | |
GORELEASER_RELEASE: true | |
GORELEASER_MOUNT_CONFIG: true | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
homebrew: | |
runs-on: ubuntu-latest | |
needs: | |
- publish | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: release version | |
run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
- name: check if pre-release | |
id: check | |
run: | | |
is_prerelease=$(./script/is_prerelease.sh ${{ env.RELEASE_TAG }}; echo $?) | |
echo "is_prerelease=${is_prerelease}" >> $GITHUB_OUTPUT | |
- name: notify homebrew with a new release | |
if: contains(steps.check.outputs.is_prerelease, '1') | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
token: ${{ secrets.GORELEASER_ACCESS_TOKEN }} | |
repo: akash-network/homebrew-tap | |
ref: refs/heads/main | |
workflow: provider-services | |
inputs: '{"tag": "${{ env.RELEASE_TAG }}"}' |