Release #53
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: | |
release: | |
types: [released] | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
publish: | |
name: Building ${{ matrix.platform.target }} | |
runs-on: ${{ matrix.platform.runs-on }} | |
strategy: | |
matrix: | |
platform: | |
- os-name: Linux-x86_64 | |
runs-on: ubuntu-20.04 | |
target: x86_64-unknown-linux-musl | |
- os-name: Linux-aarch64 | |
runs-on: ubuntu-20.04 | |
target: aarch64-unknown-linux-musl | |
- os-name: Windows-x86_64 | |
runs-on: windows-latest | |
target: x86_64-pc-windows-msvc | |
- os-name: macOS-x86_64 | |
runs-on: macOS-latest | |
target: x86_64-apple-darwin | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Build binary | |
uses: houseabsolute/actions-rust-cross@v0 | |
with: | |
command: build | |
target: ${{ matrix.platform.target }} | |
args: "--release" | |
strip: true | |
env: | |
JEMALLOC_SYS_WITH_MALLOC_CONF: "background_thread:true,metadata_thp:auto,tcache:false,dirty_decay_ms:30000,muzzy_decay_ms:30000,abort_conf:true" | |
- name: Publish artifacts and release | |
uses: houseabsolute/actions-rust-release@v0 | |
with: | |
executable-name: rustus | |
changes-file: "" | |
release-tag-prefix: "" | |
target: ${{ matrix.platform.target }} | |
docker_build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Update version | |
run: sed -i '0,/^version = .*/{s/version = .*/version = "${{ github.ref_name }}"/}' Cargo.toml | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
file: ./Dockerfile | |
target: base | |
platforms: linux/amd64 | |
tags: ghcr.io/s3rius/rustus:latest,ghcr.io/s3rius/rustus:${{ github.ref_name }} | |
- name: Build and push rootless | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
file: ./Dockerfile | |
target: rootless | |
platforms: linux/amd64 | |
tags: ghcr.io/s3rius/rustus:${{ github.ref_name }}-rootless | |
upload_helm: | |
runs-on: ubuntu-latest | |
needs: [docker_build] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: azure/setup-helm@v4.2.0 | |
with: | |
version: latest | |
- name: Build Helm chart | |
run: | | |
helm package --app-version "${{ github.ref_name }}" --dependency-update ./helm | |
helm show chart *.tgz | |
helm registry login -u "${{ github.actor }}" -p "${{ secrets.GITHUB_TOKEN }}" ghcr.io | |
helm push *.tgz oci://ghcr.io/s3rius/charts | |
env: | |
HELM_EXPERIMENTAL_OCI: 1 | |