Skip to content

release

release #14

Workflow file for this run

name: release
on:
create:
tags:
- "v*"
env:
CARGO_TERM_COLOR: always
permissions:
contents: write
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
faastrt/lambdo
tags: |
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to Docker Hub
if: ${{ !github.event.act }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: ${{ !github.event.act }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Docker Hub Description
if: ${{ !github.event.act }}
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: faastrt/lambdo
short-description: A Serverless runtime in Rust
create-github-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get tag name
id: tag
run: echo ::set-output name=tag_name::${GITHUB_REF#refs/tags/}
- name: Create GitHub Release
uses: taiki-e/create-gh-release-action@v1
with:
title: Release ${{ steps.tag.outputs.tag_name }}
token: ${{ secrets.GITHUB_TOKEN }}
upload-github-assets:
name: build-${{ matrix.target }}
strategy:
fail-fast: false
matrix:
target: ["x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt install -y pkg-config libssl-dev libudev-dev
- name: Install rust toolchain & make release
uses: taiki-e/upload-rust-binary-action@v1
with:
bin: api,agent,initramfs
target: ${{ matrix.target }}
archive: lambdo-$target
checksum: md5
token: ${{ secrets.GITHUB_TOKEN }}