Merge pull request #53 from termkit/add-sha256-summaries-into-release #28
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: Build and Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build_and_release: | |
name: Build for Multiple Platforms and Create Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.22' | |
- name: Get the latest tag | |
id: get_latest_tag | |
run: echo "LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_ENV | |
- name: Build for Linux, Windows, macOS using Makefile | |
run: make all | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "release/gama-linux-amd64,release/gama-linux-amd64.sha256,release/gama-linux-arm64,release/gama-linux-arm64.sha256,release/gama-windows-amd64.exe,release/gama-windows-amd64.exe.sha256,release/gama-macos-amd64,release/gama-macos-amd64.sha256,release/gama-macos-arm64,release/gama-macos-arm64.sha256" | |
token: ${{ secrets.GIT_TOKEN }} | |
draft: true | |
# Docker build and push steps | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 | |
tags: | | |
${{ secrets.DOCKER_USERNAME }}/gama:${{ env.LATEST_TAG }} | |
${{ secrets.DOCKER_USERNAME }}/gama:latest | |
build-args: | | |
TERM=xterm-256color |