Skip to content

Release

Release #5

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9]*.[0-9]*.[0-9]*'
jobs:
prepare:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
# Check Versions
- name: Check If Versions Match
run: |
cargo_version=$(cargo pkgid | cut -d'#' -f 2)
helm_version=$(yq .version charts/rustcloak-operator/Chart.yaml)
helm_appversion=$(yq .appVersion charts/rustcloak-operator/Chart.yaml)
set -x
test "${cargo_version}" = "${GITHUB_REF_NAME#v}"
test "${helm_version}" = "${GITHUB_REF_NAME#v}"
test "${helm_appversion}" = "${GITHUB_REF_NAME#v}"
build:
needs: prepare
runs-on: 'ubuntu-latest'
strategy:
matrix:
target:
- aarch64-unknown-linux-musl
- x86_64-unknown-linux-musl
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/rust-build
name: Build
with:
target: ${{ matrix.target }}
use-cross: true
container:
needs:
- build
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- uses: withlazers/container-action@main
with:
repository: rustcloak
password: ${{ secrets.DOCKER_TOKEN }}
ref-tags: v${{ needs.prepare.outputs.op_version }}
dockerfile: ./Dockerfile
archs: "aarch64, amd64"
release:
needs:
- container
- build
runs-on: 'ubuntu-latest'
steps:
- uses: withlazers/release-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh_key: ${{ secrets.HELMCHART_SSH_DEPLOY_KEY }}
artifacts: "*"
helm_chart: true