Skip to content

chore: Release

chore: Release #5

Workflow file for this run

name: release
permissions:
contents: "write"
on:
push:
tags: ["v[0-9]+.*"]
concurrency:
group: release-${{ github.ref_name }}
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
DRY_RUN: ${{ startsWith(github.event.ref, 'refs/tags/v') && '0' || '1' }}
jobs:
create-release:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
# (optional) Path to changelog.
#changelog: CHANGELOG.md
token: ${{ secrets.GITHUB_TOKEN }}
upload-assets:
needs: "create-release"
strategy:
matrix:
include:
- target: universal-apple-darwin
os: macos-14
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: usage
token: ${{ secrets.GITHUB_TOKEN }}
target: ${{ matrix.target }}
manifest-path: cli/Cargo.toml
env:
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1
CARGO_PROFILE_RELEASE_LTO: true
# push-to-registry:
# name: "Push Docker image to Docker Hub"
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
# needs:
# - "get-tag"
# - "upload-assets"
# runs-on: "ubuntu-latest"
# steps:
# - name: "Check out the repo"
# uses: actions/checkout@v3
#
# - name: "Log in to Docker Hub"
# uses: "docker/login-action@v2"
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: "Extract metadata (tags, labels) for Docker"
# id: "meta"
# uses: "docker/metadata-action@v4"
# with:
# images: "bwks/shazam"
#
# - name: "Build and push Docker image"
# uses: "docker/build-push-action@v3"
# with:
# context: .
# push: true
# tags: bwks/shazam:latest,bwks/shazam:v${{ needs.get-tag.outputs.pkg-version }}
# labels: ${{ steps.meta.outputs.labels }}