Skip to content

apt update

apt update #21

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
build:
continue-on-error: true
strategy:
matrix:
include:
- release_for: Linux-GNU-amd64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
arch: amd64
args: "--locked --release"
bin: dolos
- release_for: Linux-GNU-armv7
os: ubuntu-latest
target: "armv7-unknown-linux-gnueabihf"
arch: arm64
args: "--locked --release"
bin: dolos
- release_for: Windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
arch: amd64
args: "--locked --release"
bin: dolos.exe
- release_for: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
arch: amd64
args: "--locked --release"
bin: dolos
- release_for: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
arch: arm64
args: "--locked --release"
bin: dolos
runs-on: ${{ matrix.os }}
steps:
- name: install deps [Ubuntu]
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install make llvm-dev libclang-dev clang pkg-config libssl-dev
- name: install deps [MacOS]
if: matrix.os == 'macOS-latest'
run: |
brew install [email protected]
- name: checkout repository
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: both
target: ${{ matrix.target }}
args: ${{ matrix.args }}
strip: true
- name: rename binaries
run: |
mv target/${{ matrix.target }}/release/${{ matrix.bin }} ${{ matrix.release_for }}-${{ matrix.bin }}
- name: upload artifacts
uses: actions/upload-artifact@v3
with:
name: binary-${{ matrix.release_for }}
path: ${{ matrix.release_for }}-${{ matrix.bin }}
docker:
runs-on: ubuntu-latest
needs: [build]
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/txpipe/dolos
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern=v{{major}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{version}}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: ghcr.io/txpipe
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: .github/Dockerfile
platforms: linux/arm64,linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
release:
needs: [build, docker]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: setup go
uses: actions/setup-go@v4
with:
go-version: "1.16"
- name: download artifacts
id: "download"
uses: actions/download-artifact@v3
- name: set release notes
run: |
go install github.com/git-chglog/git-chglog/cmd/[email protected]
git-chglog -c .github/chglog/release.yml $(git describe --tags) > RELEASE.md
- name: create release
uses: softprops/action-gh-release@v1
with:
files: binary-*/*
body_path: RELEASE.md
draft: true