Skip to content

chore: prepare for crate publishing #30

chore: prepare for crate publishing

chore: prepare for crate publishing #30

Workflow file for this run

name: Release
on:
push:
branches:
- main
- publish # TODO: Remove this line after the test
tags:
- "v*.*.*"
jobs:
# build:
# runs-on: ubuntu-latest
# permissions:
# packages: write
# strategy:
# fail-fast: false
# matrix:
# platform:
# - linux/amd64
# - linux/arm/v7
# - linux/arm64
# steps:
# - name: Prepare
# run: |
# platform=${{ matrix.platform }}
# echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
# - name: Checkout
# uses: actions/checkout@v4
# - name: Docker meta
# id: meta
# uses: docker/metadata-action@v5
# with:
# images: |
# cerberauth/baffao
# ghcr.io/cerberauth/baffao
# tags: |
# type=schedule
# type=ref,event=branch
# type=ref,event=pr
# type=semver,pattern={{version}}
# type=semver,pattern={{major}}.{{minor}}
# type=semver,pattern={{major}}
# type=sha
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
# - name: Login to Docker Hub
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Login to GitHub Container Registry
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build and push
# uses: docker/build-push-action@v5
# with:
# context: .
# platforms: ${{ matrix.platform }}
# push: ${{ github.event_name != 'pull_request' }}
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
publish-package:
runs-on: ubuntu-latest
name: Publish package
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo publish -p baffao
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}