release: beerus v0.6.0 #21
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*' | |
jobs: | |
release: | |
name: Release for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
artifact_name: beerus-linux-x86_64.tar.gz | |
asset_name: beerus-linux-x86_64.tar.gz | |
## TODO: decide to keep or drop darwin support | |
# - os: macos-latest | |
# artifact_name: beerus-darwin-x86_64.tar.gz | |
# asset_name: beerus-darwin-x86_64.tar.gz | |
container: | |
image: ${{ matrix.container || '' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: cache deps | |
uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- name: build | |
run: cargo build --release | |
- name: create tarball | |
run: tar -C target/release -czvf ${{ matrix.artifact_name }} beerus | |
- name: upload release binaries | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{ matrix.artifact_name }} | |
asset_name: ${{ matrix.asset_name }} | |
tag: ${{ github.ref }} | |
docker-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: setup docker build | |
uses: docker/setup-buildx-action@v2 | |
- name: login to docker | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: push docker image ghcr | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
tags: > | |
ghcr.io/${{ github.repository }}:latest, | |
ghcr.io/${{ github.repository }}:${{ github.ref_name }} |