Skip to content

tag version v0.15.1 #34

tag version v0.15.1

tag version v0.15.1 #34

Workflow file for this run

name: Build (Tag)
on:
push:
tags:
- v*
permissions:
packages: write
# Required to create relases
contents: write
pull-requests: read
jobs:
build:
name: Build
runs-on: ubuntu-latest
outputs:
release_upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: vars
run: make ci--env
- uses: docker/[email protected]
with:
tags: |
ghcr.io/beryju/gravity:stable
ghcr.io/beryju/gravity:v${{ steps.vars.outputs.version }}
push: true
platforms: linux/amd64,linux/arm64
context: .
build-args: |
BUILD=${{ steps.vars.outputs.build }}
GIT_BUILD_HASH=${{ steps.vars.outputs.sha }}
- run: |
make bin/gravity-cli
- uses: actions/[email protected]
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ steps.vars.outputs.version }}
draft: true
prerelease: false
body: |
Upgrade to this version of gravity by using this container image:
```
ghcr.io/beryju/gravity:v${{ steps.vars.outputs.version }}
```
Upgrade to the current JS API Client using
```
npm i gravity-api@${{ steps.vars.outputs.version }}
```
Upgrade to the current Golang API Client using
```
go get beryju.io/gravity@v${{ steps.vars.outputs.version }}
```
build-cli:
name: Build CLI
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
arch: [arm64, amd64]
os: [darwin, linux]
steps:
- uses: actions/checkout@v4
- run: |
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} make bin/gravity-cli
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.build.outputs.release_upload_url }}
asset_path: ./bin/gravity-cli
asset_name: gravity-cli_${{ matrix.os }}_${{ matrix.arch }}
asset_content_type: application/octet-stream