Merge pull request #659 from oasisprotocol/mitjat/v0.2.10 #63
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 | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+*' | |
permissions: | |
contents: write | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/[email protected] | |
with: | |
go-version: 1.21 | |
- name: Install Go tools | |
run: go install github.com/deepmap/oapi-codegen/cmd/[email protected] | |
# Prepare the GitHub release. | |
- name: Install GoReleaser | |
uses: goreleaser/goreleaser-action@v3 | |
with: | |
install-only: true | |
distribution: goreleaser | |
version: 1.2.5 | |
- name: Build and publish the next release | |
run: | | |
make release-build | |
env: | |
# Instruct Make to create a real release. | |
NEXUS_REAL_RELEASE: "true" | |
# Pass automatically created GitHub App installation token to the action. | |
# For more info, see: | |
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token. | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Prepare the tagged Docker image. | |
- name: Set release tag | |
run: | | |
echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_ACCESS_TOKEN }} | |
- name: Build and push docker | |
uses: docker/build-push-action@v3 | |
with: | |
build-args: | | |
TAG=${{ env.TAG }} | |
context: . | |
file: docker/nexus/Dockerfile | |
tags: | | |
oasislabs/oasis-indexer:${{ env.TAG }} | |
push: true | |
labels: | | |
org.opencontainers.image.source=${{ github.event.repository.html_url }} | |
org.opencontainers.image.revision=${{ github.sha }} |